-: Welcome back.
In the last lecture we talked
about configuring our Kali Linux network settings
to have internet connection
inside of our Kali Linux machine.
Now let's see whether that is set properly.
And in case it isn't,
let's see what we can do to get network connectivity
within our Kali Linux machine.
So a quick reminder, last lecture,
we selected our Kali Linux machine.
We went on settings, we went on network settings
and we chose bridged adapter for our Kali Linux machine.
Now to check whether that works, we can type, once again
ifconfig inside of our terminal that we can open
by clicking on this icon right here
which is the terminal icon.
And under the ETH0 interface
we should get our IPV4 address
that should belong to our network's IP range.
If you do get it, that's good.
If you don't get it
or if you don't get any IP address at all right here,
then we must change something.
But before we do that
we want to also check whether we can ping, let's say Google.
Or any IP address or any website whatsoever.
As you can see, I am receiving responses
right here from Google, so that is good.
I am also getting an IP4 address
that belongs to my network range.
So both of these things are good
and I can proceed to the next lecture with bridge adapter.
If both of these also work for you, feel free to continue
and you can skip the rest of this lecture
and just move on to the next one.
If your bridged adapter, however, is causing some issues,
whether that being your IP not being present here
or you're not getting any packets back from Google
or any other website or IP address,
then we have to change our network settings.
So go back the VirtualBox window,
select your virtual machine or your Kali Linux machine,
go to settings.
And another option that we can go besides bridge adapter
in case bridge adapter doesn't work.
So always go first with bridge adapter,
but in case it doesn't work, we want to go with NAT network.
So don't confuse it with NAT.
We are not choosing just NAT, we want to choose NAT network.
And here you will notice
that we don't have NAT network selected.
That is because we haven't created one yet.
But before we create it,
let's just quickly explain what NAT network is.
Essentially, NAT Network allows us
to have a separate network
where our virtual machine will be connected to
and later on, once we create multiple virtual machines,
we can put several different virtual machines
onto the same NAT network
and they will be able to communicate
with one another.
If we just leave it on NAT, which is the default
then our virtual machine
will most likely have internet connection,
but it will not be able to communicate with machines
inside of our network.
Okay, if we select NAT network, let's click on cancel first
so we can create it,
and to create the NAT network, we want to click on tools,
we want to click on preferences, we want to go to network.
And here under the NAT networks
we want to click on this plus sign,
which will generate the NAT network for us.
If I double click it
it'll also give us the information about the NAT network.
And if you want, you can change certain things right here
such as whether you support IP6,
or you want to change the range of your network.
It doesn't matter, the network name, it's all up to you.
I will just leave all of this on default
and I will click on okay.
I will also click on okay here.
And all I have to do
is go back to settings of my Kali Linux virtual machine.
Go back to the network settings
and switch from bridge adapter to NAT network.
And now you will see that under the name
we have our NAT network selected.
Once I click okay, it will save the settings.
I will now reboot my virtual machine.
Let's give it a restart.
So here it is, our Kali Linux or my Kali Linux has rebooted.
And now let's see whether we do get an IP address
and whether we can ping websites from our Kali Linux.
So first thing we do, once again,
we open terminal by clicking here
and if I type ifconfig, now we get a different IP address,
which is the IP address from the NAT network right here,
which is good.
And yours might be different just so you know.
It doesn't have to be the same as mine.
And the second test that we perform is we ping Google
or we ping any other website or IP address
and we are getting response back
so our NAT network works properly.
Okay, awesome.
That would be all when configuring network settings.
Now two things to take away from this lecture
and previous lecture are if your network settings
work well with bridge adapter,
then proceed with the bridge adapter here
and for any future virtual machine
that we create throughout the course.
If you have problems with bridge adapter,
whether that being not having an IP address
or not being able to browse Firefox
or not being able to ping any website
then proceed by going onto the NAT network.
Configure the NAT network
which we did from tools and then preferences
and then select the NAT network here, reboot your machine
and it should have the NAT network's IP address.
As well as it should be able to ping different websites.
The same thing should be applied
for any future VM that we create throughout the course.
If your Kali Linux is on NAT network
the other virtual machines should also be on NAT network
in order for them to communicate.
Nonetheless, thank you for watching
and I will see you in the next lecture.