One Day One GNU/Linux Command (NMAP)
nmap -- Network security / port scanner.
Summary:Nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap does 3 functions, 1: ping a number of hosts to determine if they are up, 2: port scan a number of hosts to determine what are services that they are offering and 3: attempt to determine the OS running on the remote hosts. Examples:
$ nmap localhost -- List all open TCP ports in the local host. $ nmap -v localhost -- Same as above. But with detailed output. $ nmap -v -O localhost -- Try to guess the OS running in localhost. $ nmap -v -p 22, 25,53,80,110 localhost -- Show the status of SSH, SMTP, DNS, HTTP, POP3 ports. $ nmap -sU localost -- List all open UDP ports in the localhost. $ nmap 192.168.1.1-200 -- List all open ports in all machines from 192.168.1.1 to 192.168.1.200.Read: man nmap