Page 1 of 1

Monitor established connections to Server

Posted: 2023 May 03, 20:53
by Mihai
  • netstat

Code: Select all

[root @ centos ~]$ netstat -n | grep ES
tcp 0 64 192.168.50.1:12345 192.168.50.5:49898 ESTABLISHED
  • lsof

Code: Select all

[root @ centos ~]$ lsof -i | grep -i established
sshd 3419 root 3u IPv4 14871903 0t0 TCP 192.168.50.1:12345->192.168.50.5:49898 (ESTABLISHED)
sshd 3424 cio 3u IPv4 14871903 0t0 TCP 192.168.50.1:12345->192.168.50.5:49898 (ESTABLISHED)
  • ss

Code: Select all

[root @ centos ~]$ ss -tl4 '( sport = :22 )'

State           Recv-Q        Send-Q        Local Address:Port        Peer Address:Port
LISTEN        0                 128              *:ssh                              *:*