Posts

Showing posts with the label network command

Useful network command for Linux

  nc (netcat) command : used for port scanning, port redirection, as a port listener $ nc -v -w 2 z <ip-address> 22 #scan a single port $ nc -v -w 2 z <ip-address> 22 80 #scan multiple ports $ nc -v -w 2 z <ip-address> 20–25 #scan range of ports nmap command : Nmap is used for exploring networks, perform security scans, network audit and finding open ports on remote machine The Nmap tool offers various methods to scan a system. In this example, I am performing a scan using hostname to find out all open ports, services and MAC address on the system # nmap [Scan Type(s)] [Options] {target specification} # yum install nmap [on Red Hat based systems] $ sudo apt-get install nmap [on Debian based systems] with “-v” option is giving more detailed information about the remote machine. nmap <hostname or IP> nmap -v <IP> You can scan multiple hosts by simply writing their IP addresses or hostnames with Nmap. nmap <IP1><IP2> nmap -sU <IP...