Читать книгу Kali Linux Penetration Testing Bible - Gus Khawaja - Страница 59

Static IP Addressing

Оглавление

If you want to assign a fixed IP address to your Kali host, you will need to edit the configuration file /etc/network/interfaces . In the following new configuration, shown in Figure 1.18, add these three main components:

 Static IP address (it's going to be 10.0.0.20 in my case; in your case, it has to match your private IP address range)

 Subnetmask or CIDR (/24 means 255.255.255.0)

 Router/gateway IP address (my router IP address is 10.0.0.1; yours could be different)


Figure 1.18 Static IP Configs

After you save your changes, make sure to reboot your Kali machine to get this new fixed IP address up and running. To test the connectivity to the outside world (after rebooting), try to ping the popular Google's DNS server on 8.8.8.8 (if for any reason you want to reverse your changes, just go back to the config file and remove/comment the new lines), as shown in Figure 1.19.


Figure 1.19 Testing Internet Connection

Take note that we're using 10.0.0.0 network as our main VLAN (virtual network). In fact, we have multiple VLANs in our home network. For example, we have a VLAN for IoT devices, but why? It's because we want IoT devices to be on a separate network (10.0.50.0/24) without interfering with my main production hosts.

Another example is the Guests VLAN. This network is for people who connect to the wireless guest access point, and they will be assigned in the 10.0.20.0 address range.

Companies implement the same concept. Ideally, they have a development environment that is different than the production environment network VLAN.

Kali Linux Penetration Testing Bible

Подняться наверх