How to configure the network for Kali Linux?

  
                

After Kali Linux is installed, many people don't know how to configure the network. This article takes the static IP of the campus network as an example to introduce the network configuration method of Kali Linux. Let's learn together.

After the installation is complete kali, first make sure you are DHCP or static IP. DHCP is a protocol used to dynamically allocate IP to large networks. Most small and medium-sized networks (such as campus networks and home networks) use network administrators to manually assign static IPs to determine IP addresses.

First, find the interfaces file under /etc/network in the file system. After opening, you can see that eth0 is dhcp and modify it to the following form:

# This file describes the network Interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static //config Eth0 uses the default static address

address 192.168.77.133 //sets the IP address of eth0

netmask 255.255.255.0 //configures the subnet mask of eth0

gateway 192.168 .77.254 //Configure the default gateway of the current host

“interfaces” There are many other settings in the file. For more information, you can use the man command to query the manual of the "interfaces" file. page.

#man interfaces

where eth0 refers to the local Ethernet card, similarly, eth1 refers to the local Ethernet card 2. Generally, a computer has only one eth0. The NIC's device name /dev/eth0 corresponds to the hardware's MAC address 52:54:AB:DD:6F:61. The MAC address is the unique address owned by the manufacturer and owned by each NIC.

Under linux, after using ifconfig, you can see eth0, and you may also see eth0:1. Where eth0:1 refers to the ip storage file of eth0, the ip storage file format is ifcfg-eth0:X, X is any positive integer (including 0)

The specific role is to achieve single NIC multiple ip, similar Multiple ip with windows.

Second, configure DNS

Kali Linux DNS server address is configured with the file “/etc/resovl.conf”, users can set the IP address of the DNS server through the “nameserver” configuration item Address; <;resolv.conf” The file can be used up to

“nameserver” specifies 3 DNS servers, in the order of the order, once the previous DNS server fails, the system will automatically use the latter DNS server.

The modification of the "resolv.conf" file setting “nameserver” is effective immediately, that is, as long as the modification of the "resolv.conf" file is saved, the domain name is required next time in the system. When parsing, the domain name will be parsed according to the IP address of the DNS server specified in the file

.

The format in resolv.conf is as follows:

domain

nameserver 10.10.10.10

nameserver 102.54.16.2

Restart the network

After the previous steps are completed, save and then restart the network in the terminal. The command is as follows: /etc/init.d/networking restart

After you finish the browser, you can open the browser. The web download login client is online!

The above is the introduction of the network configuration method after Kali Linux is installed. This method is only applicable to the intranet. If it is other networks, you can make a reference. Try it out.

Copyright © Windows knowledge All Rights Reserved