Site Tools


monitor_connections

This is an old revision of the document!


Actively monitor connections

There are cases where you want to monitor a specific type of connection going from/to & through your router. As an example the following example keeps track of DNS requests towards name servers.

watch -tn5 “conntrack -L -p udp –dport 53 | sort -nrk3; echo; conntrack -L -p tcp –dport 53 | sort -nrk3”

53 of course refers to DNS and in the above case includes both udp and tcp. You can change this to any port of relevancy (e.g. 443) to change the command scope.

monitor_connections.1655881614.txt.gz · Last modified: 2022/06/22 08:06 by rs232