Page 1 of 1

find what process is using what port

Posted: Tue Apr 18, 2023 7:45 pm
by zemerdon

Code: Select all

root@VPN:/home/zemerdon# fuser 514/tcp
514/tcp:              5306

Code: Select all

root@VPN:/home/zemerdon# lsof -i :514
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
rsyslogd 5306 root    7u  IPv4  60729      0t0  UDP *:syslog 
rsyslogd 5306 root    8u  IPv6  60730      0t0  UDP *:syslog 
rsyslogd 5306 root    9u  IPv4  60734      0t0  TCP *:shell (LISTEN)
rsyslogd 5306 root   10u  IPv6  60735      0t0  TCP *:shell (LISTEN)

Code: Select all

root@VPN:/home/zemerdon# netstat -lpna | grep 514
tcp        0      0 0.0.0.0:514             0.0.0.0:*               LISTEN      5306/rsyslogd       
tcp6       0      0 :::514                  :::*                    LISTEN      5306/rsyslogd       
udp        0      0 0.0.0.0:514             0.0.0.0:*                           5306/rsyslogd       
udp6       0      0 :::514                  :::*                                5306/rsyslogd 

Code: Select all

root@VPN:/home/zemerdon# ss -tulnp | grep rsys
udp   UNCONN 0      0            0.0.0.0:514        0.0.0.0:*    users:(("rsyslogd",pid=5306,fd=7))    
udp   UNCONN 0      0               [::]:514           [::]:*    users:(("rsyslogd",pid=5306,fd=8))    
tcp   LISTEN 0      25           0.0.0.0:514        0.0.0.0:*    users:(("rsyslogd",pid=5306,fd=9))    
tcp   LISTEN 0      25              [::]:514           [::]:*    users:(("rsyslogd",pid=5306,fd=10))