Wednesday, July 26, 2017

Linux Basics - Networking Commands

If you are interested in computer security domain, it is important you have a good understanding about networking, particularly networking associated with Linux. so lets take a look at a few basic commands that are used in Linux OS.

ifconfig is one of the mostly used commands when it comes to networking in Linux. It provides you with lot of information regarding the available network interfaces. This command is very similar to the ipconfig command in Windows.

As you can see it show the interfaces eth for ethernet connections, lo for loop back  and wlan for wireless connections.
This provide further information such as the IP address, subnet mask, broadcast adddress and the MAC address of the interface. You can use ifconfig command d to turn these interfaces up or down
ifconfig < interface > up - turn the interface up
ifconfig < interface > down - turn the interface down
ifconfig command can also be used to change the current details associated with an interface 
ifconfig <interface> <new IP> - Change the IP address of the given interface
 it also can be used to change other information such as subnet mask and broadcast address
 ifconfig <interface> <new IP> netmask <subnet_addr> broadcast <broadcast_addr>

You can also use the Linux's DHCP sever daemon to assign IP address to all systems on the subnet.
if you want dhcp server to assign new address  you can use systems built in dhcp client, in Kali Linux it is dhclient.

Another important command is netstat command.
netstat -r - Display the routing table.
netstat -l - Displays the open or listening ports.

  route command also can be used to display the routing table information.
These are few basic commands related to networking in Linux. To get more understanding about these commands use the man command
  

No comments:

Post a Comment