How to check and open ports in Linux

The most common host-based tool for checking for open ports on Windows or Unix systems is the netstat command. To see open TCP Network Ports :- vishal@vyas:~# netstat -vatn To see DNS Hostnames :- vishal@vyas:~# netstat -vat To see open UDP Network Ports:- vishal@vyas:~# netstat -vaun =================================================================== Nmap (“Network Mapper”) is an open source tool for network exploration and security auditing. Nmap can provide further information on targets, including reverse DNS names, operating system guesses, device types, and MAC addresses. vishal@vyas:~# nmap -sS 10.10.10.50 Starting Nmap 4.53 ( http://insecure.org ) at 2011-12-26 12:35 IST Interesting ports on vishalvyas.com (10.10.10.50): Not shown: 1703 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 110/tcp open pop3 111/tcp open rpcbind 139/tcp open netbios-ssn 143/tcp open imap 445/tcp open microsoft-ds 993/tcp open