When we issue netstat command we can see what are the ports listening on my system. Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Netstat prints information about the Linux networking subsystem.
[root@rahul-linux ~]# netstat -an |grep 5432
tcp 0 0 192.168.140.102:5432 0.0.0.0:* LISTEN
tcp 0 0 192.168.160.102:5432 0.0.0.0:* LISTEN
tcp 0 0 192.168.198.102:5432 0.0.0.0:* LISTEN
-l or --listening shows only the sockets currently listening for incoming connection.
-a or --all shows all sockets currently in use.
-t or --tcp shows the tcp sockets.
-u or --udp shows the udp sockets.
-n or --numeric shows the hosts and ports as numbers, instead of resolving in dns and looking in /etc/services.
netstat -atn # For tcp
netstat -aun # For udp
netstat -atun # For both
[root@rahul-linux ~]# netstat -an |grep 5432
tcp 0 0 192.168.140.102:5432 0.0.0.0:* LISTEN
tcp 0 0 192.168.160.102:5432 0.0.0.0:* LISTEN
tcp 0 0 192.168.198.102:5432 0.0.0.0:* LISTEN
-l or --listening shows only the sockets currently listening for incoming connection.
-a or --all shows all sockets currently in use.
-t or --tcp shows the tcp sockets.
-u or --udp shows the udp sockets.
-n or --numeric shows the hosts and ports as numbers, instead of resolving in dns and looking in /etc/services.
netstat -atn # For tcp
netstat -aun # For udp
netstat -atun # For both
NSLOOKUP
Nslookup helps us find possible IP addresses of any site like www.google.com
No comments:
Post a Comment