Kali Linux Network Configuration for Ethernet Connection

This article about “Kali Linux network configuration and settings” it will cover all about network configuration of LAN and Wireless LAN adapter, assign IP manually and by dHCP server as well.

Kali Linux Network Configuration for Ethernet Connection

Network interfaces (LAN adapter, wireless adapter, usb adapter, fast Ethernet) are responsible to connect and make communication between two or more computers in a network. If network card is not configured properly, then you are out of network and configuration is important for network security. Network should have proper IP Address, subnet mask, Default gateway, domain name server etc.
So configure network and get into the network. but most important question:

How do you check Kali Linux network configuration?

There are different methods for windows and Linux operating systems. Here we are discussing about kali linux, I will explain tasks used in Linux. Following command is used to check the status of the networking cards in Kali Linux:
#ifconfig
#ifconfig –a

Using The Command Line To Configure Network Interface In Kali Linux _image1

ifconfig command sow assigned IP address, MAC, Netmask, for IPv4. you can run this command as normal user and sudo user.

Enable/Disable network interface cards

Ifconfig command using the up option can start network interface and stopped using the down option. Following syntax is used
#ifconfig eth0 down
#ifconfig eth0 up
Using The Command Line To Configure Network Interface In Kali Linux _image2

Using The Command Line To Configure Network Interface In Kali Linux _image3

Assign IP Address for network (eth0 or wlan0)

Eth0 is the number of wired network interface card. if you want to assign ip address for wireless adapter replace eth0 by wlan0. The current configuration of this adapter can be changed by using following command and this command will assign new ip address for your computer interface
#ifconfig eth0 192.168.1.10

Kali Linux network configuration with IP address and Netmask

Netmask is used to indentify the network address. It can be configured by using given command. This will set the ip address 192.168.1.10 and set the subnet mask 255.255.255.0
#ifconfig eth0 192.168.1.10 netmask 255.255.255.0
Using The Command Line To Configure Network Interface In Kali Linux _image4

Add default gateway

Default gateway is added or changed, by using following command. It will set the default gateway 192.168.1.1
#route add default gw 192.168.1.1
Using The Command Line To Configure Network Interface In Kali Linux _image5

Add dns-namesevers

In Linux Domain Name Server or DNS can be set or modifying the resolv.conf  in the /etc directory. It can be changed by editing this file. add the following sytex in terminal
#echo nameserver 8.8.8.8 > /etc/resolv.conf
This command will remove the current nameserver and set 8.8.8.8. It can be added alternate nameserver by using following syntax
#echo nameserver 4.4.4.4 >> /etc/resolv.conf

Kali Linux network configuration from DHCP 

DHCP services is one of the easiest ways to configure a Ethernet. Free DHCP server provides all required configuration setting for network card. Use the following method:
#leafpad /etc/networking/interfaces
make these entries
auto eth0
iface eth0 inet static
address {ip_Address}
netmask {netmask}
gateway {Default_gateway_IP_Address}
Save the file and exit to complete modification. It is required to take down network and again bring up Ethernet interfaces to applying this configuration.
Use following command to configure network adapter
#dhclient eth0
This will configure the network adapter using the settings provided by the DHCP Server.

Comments

Popular posts from this blog

Infanrix-IPV + Hib

Pediacel