Watching active IP connections - Linux

Jasun -

The following command is useful to watch what connections from the Internet are being made on your Linux system:

watch -d -n1 lsof -i

 

This will run the command lsof ( with the list interface option ) ever second and highlight differences

 

You can use the watch command with netstat as well to see connections:

watch -d -n1 'netstat -anp | grep -i stream'

 

The following command will show socket connections and the process that is bound to a port:

ss -nap

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.