# Setting up your network

Setting up your network.
4.6
You should now have the two VMs running on your desktop. Let’s first start with some checks. The Kali VM has two virtual network interfaces. The first one is set to NAT and should be disconnected by default. By this interface the VM uses your computer network connection to connect to the internet. In some lab exercises you will need to connect Kali to the internet but in most labs you will use host-only connections. So leave it disconnected for now. The other interface is set to host-only, meaning that all traffic through this interface will only be visible to the other VMs running on your computer and it should be connected. Next we want to check the network configuration of your Linux.
60.1
There are several ways to do that. We will use the ifconfig command to check and control the network interfaces. We can see the two network interfaces ETH0 and ETH1. Let’s shut down the first one. This is the NAT.
92
And set up the IP address for the second interface, which is the host-only one. In some labs you will need to change the IP address of your Kali in order to move it to the subnet of your target. You can do that by simply entering ifconfig, the name of the interface you want to change and its IP address.
120.5
Next we need to configure the routing through this interface. Enter the command route add -net to network 192.168.5.0 with a mask of 255.255 255.0 to eth 1. Finally we check that everything is set correctly by entering ifconfig again. As we can see the first network interface eth0 is shut down, i.e. it’s no longer in the list, and the IP for the ETH1 is set to 192.168.5.10. Now we check the routing it is set up - don’t worry if some of this doesn’t yet make much sense to you. We will dive into this in greater detail in later courses. For now we just need to get you up and running. With this our Kali machine is ready for the first exercise.
190.7
Remember these checks as it is a good idea to run them at the beginning of each exercise.
Earlier this week, you should have downloaded the virtual machines (VMs) required for the following practical exercise. Please refer back to the step ‘setting up a virtual lab’ if you have not done this.
Before we start the Linux skills builder activity, we need to check and, if required, configure the networking in our VMs.
Watch the video to find the commands to configure basic networking in Linux. Remember these steps as it is a good idea to run them at the beginning of each exercise.
Note: If you are using CUEHaliLight VM, your networking should be already set up for the exercise. Verify this by looking at the IP addresses of the network interfaces.
If this is not the case for some reason, the following two commands should set you up for the lab:
ifconfig eth1 192.168.5.10 netmask 255.255.255.0ip route add 192.168.5.0/24 dev eth1

Created by

## Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.