Sunday, January 29, 2017

How to check port connection/status ?



From the below example you can see status of ports of 161 and 22 .
Same way you can change it to your port number and grep .


[root@linuxtechnotes ~]# netstat -tunlap  | grep -i 161
udp        0      0 0.0.0.0:161                 0.0.0.0:*                               9474/snmpd
[root@linuxtechnotes ~]#
[root@linuxtechnotes ~]# netstat -tunlap  | grep -i 22
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      7544/sshd
tcp        1      0 192.168.150.129:54189       23.59.189.83:80             CLOSE_WAIT  26225/clock-applet
tcp        0     64 192.168.150.129:22          192.168.150.1:53360         ESTABLISHED 5996/sshd
tcp        0      0 :::22                       :::*                        LISTEN      7544/sshd
[root@linuxtechnotes ~]#



No comments:

Post a Comment