USING THE GRAPHICAL USER INTERFACE TO CONFIGURE NETWORK INTERFACES
Configuring the network cards, also called network adapters, in Linux was once a process that could only be completed through the command line. This has changed in recent years, and Kali Linux is no different in fact Kali
Linux has a robust graphical user interface (GUI) that allows many of the common settings to be configured through the use of simple dialog boxes. The network configurations dialog box is easily accessible by selecting Applications in the top right of the user interface (Figure 1) and then selecting System Tools, Preferences, and Network Connections.
By clicking network connections, the network connections dialog box will be displayed, the wired tab is selected by default (Figure 2). Alternatively, right-click on the two computers on the top right of the screen, as in Figure 3, and selecting edit connections will result in accessing the same dialog box. In most cases, computers will have only one network card that will need to be configured, in cases where multiple NICs are installed, ensure you are configuring the correct
FIGURE 3 Alternate graphical wired network configuration.
card. This example will configure Wired connection 1, a name that can be changed if you like to something more meaningful, the only physical network card in the computer. The configuration dialog box is displayed after selecting the connection to be modified and click the Edit button. This will bring up the Editing box for the connection, with the Wired tab selected by default. This tab displays the devices media access control (MAC) address, an address that is designed to remain the same for the life of the device, see the note on MAC addresses for more information on MAC addresses. The devices identifier are also displayed in parenthesis after the MAC address. In this case, the device identifier is eth0, where eth is short for Ethernet and 0 is the first card in the computer. The numbering sequence for network cards starts at 0 and not 1 so the second card in the computer would be eth1.tab.
Wired Ethernet configurations can be made by selecting the 802.1x Security tab, the IPv4 Settings, or the IPv6 Settings tab. This book will focus on configuring the IP version 4 (IPv4) settings so that tab will be selected. Once
selected the configurations for the computers IP address (192.168.1.66), Subnet Mask or Netmask (255.255.255.0), Gateway (192.168.1.1), and DNS servers (192.168.1.1). Multiple DNS servers can be used by separating each
with a comma. The configuration can be saved and made active by selecting the Save button.
USING THE COMMAND LINE TO CONFIGURE NETWORK INTERFACES
Terminal window. There is a range of instances in penetration testing in which the control line is going to be the sole alternative for making setup changes. These changes need to be created as a user with increased permissions
working with the main account is a fantastic means to produce these modifications on a live supply and creating them utilizing the SDO control is an alternative for installments of Kali Linux. After permissions are raised, the system card may be configured.
Assessing the status of their computers system cards and the standing of each card has been completed with the next command.
This will show the current configuration of network cards onto the pc. In Figure 4, two community addresses are exhibited, eth0 the very first Ethernet card along with lo that the loopback or inner port. The preferences for this
The adapter was put together with the graphics interface. Transforming these is easy with the command prompt.
Starting and Stopping the Interface
The port could be initiated with all the up alternative or ceased using the downward button of the ifconfig command after defining the port to be started or stopped. The next command will discontinue the primary Ethernet adapter.
ifconfig eth0 down
The following command would start the first Ethernet adapter.
ifconfig eth0 up
The IP address of this adapter can be changed from 192.168.1.66, its current configuration, to 192.168.1.22 by using the following command.
ifconfig eth0 192.168.1.22
The command line can be used to change the network mask as well by using the following command. This will set the IP address to 192.168.1.22 and set the subnet mask to 255.255.0.0.
ifconfig eth0 192.168.1.22 netmask 255.255.255.0
Full configuration of the network card at the command line does require a bit more work than using the graphical user interface as the configuration settings are not all stored in the same location. The default gateway is added or changed, in this case to 192.168.1.2, with the following command.
route add default gw 192.168.1.2
The name server (or DNS) settings are changed by modifying the resolv.conf file in the /etc directory. This can be changed by editing the file with your favorite editor or simply using the following command at the command
echo nameserver 126.96.36.199 . /etc/resolv.conf
The above command will remove the existing nameserver and replace it with 188.8.131.52. To add additional nameservers, the following command will append new nameserver addresses adding to those already listed in resolv.conf.
When the computer performs a name lookup, it will check the first three nameservers in the order they are listed.
echo nameserver 184.108.40.206 .. /etc/resolv.conf
DHCP from the Command Prompt
This way the DHCP server will supply all of the settings necessary for the card. This can be convenient for most end users But is not optimal when running penetration tests since the system has been configured is logged from the DHCP server’s database. Use these commands to disable automated DHCP configuration when conducting penetration tests. This case utilizes the superior editor, but additional text editors can be used.
#add the following lines##
iface eth0 inet static
Save the text file and exit to complete the modification. It may be necessary to take down and bring back up the Ethernet interfaces to enable this configuration.
To configure the first network card simply enter the following command at the command prompt.
This will automatically configure the network card using the settings provided by the DHCP server.
USING THE GRAPHICAL USER INTERFACE TO CONFIGURE NETWORK INTERFACES USING THE GRAPHICAL USER INTERFACE TO CONFIGURE NETWORK INTERFACES USING THE GRAPHICAL USER INTERFACE TO CONFIGURE NETWORK INTERFACES