Who are browsing my home/office web server?
lsof -r 2 -n -P -c nginx -a -i TCP@IPAddress:80
Feel free to replace port 80 with other ports such as 21 (FTP), 22(SSH), 443 (HTTPS) and so on to get the same info. The -c options set the user name (see man page http://www.manpager.com/linux/man8/lsof.8.html for more info on all options) :
lsof -r 2 -n -P -c vsftpd -a -i TCP@IPAddress:21
lsof -r 2 -n -P -c sshd -a -i TCP@IPAddress:22
netstat -punt | grep ":80"
http://www.manpager.com/linux/man8/lsof.8.html
lsof -r 2 -n -P -c nginx -a -i TCP@IPAddress:80
Feel free to replace port 80 with other ports such as 21 (FTP), 22(SSH), 443 (HTTPS) and so on to get the same info. The -c options set the user name (see man page http://www.manpager.com/linux/man8/lsof.8.html for more info on all options) :
lsof -r 2 -n -P -c vsftpd -a -i TCP@IPAddress:21
lsof -r 2 -n -P -c sshd -a -i TCP@IPAddress:22
netstat -punt | grep ":80"
http://www.manpager.com/linux/man8/lsof.8.html
No comments:
Post a Comment