Setting a static IP on Kali

Sometimes, you need to have a dedicated static LAN IP address for your Kali Linux. A very practical scenario is when you're on duty and you want to go under the radar, by not communicating with the DHCP server of your client (or your employer). Another purpose for a static IP address is if you have a separate VLAN, and you want to join it manually.

Let's look at the implementation of a static IP address:

  1. First, open the file /etc/network/interfaces using your favorite text editor:

I will add a new static IP address, 10.0.0.99, to the network 10.0.0.0/24, at the end of the file. In your case, the network will probably be 192.168.0.0/24. As for me, I use the 10.0.0.0 network addressing architecture:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

#Static IP Address
auto eth0
iface eth0 inet static
address 10.0.0.99
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
  1. Save the file (Ctrl + S), and restart your Kali machine. (Hint: I will use the reboot command in the Terminal window to restart my Kali.) After the reboot, execute the ifconfig command, and you should see your new IP address set. Then, you will be ready to go:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.140.5