Sheel commands for searching networks
#Networking
List all ports being listened to:
netstat -l
To display open ports and established TCP connections, enter:
netstat -vatn
FreeBSD/OS X Unix user try the following command:
netstat -na | grep -i LISTEN
netstat -f inet -na | grep -i LISTEN
lsof Command Examples, To display the list of open ports, enter:
lsof -i