Tuesday, December 27, 2011

how to check open ports on linux machine?

Use the commands
1) nmap -sS -O 127.0.0.1 or
2) netstat -nap   
   netstat --listen
 To display open ports and established TCP connections, enter:
   netstat -vatn
 To display only open UDP ports try the following command:
  netstat -vaun\
  if you want to see FQDN (full dns hostname), try removing the -n flag:
  netstat -vat

No comments: