Site Tools


monitor_connections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
monitor_connections [2022/06/22 08:01] – created rs232monitor_connections [2023/05/03 04:03] – -formatting, clarity hogwild
Line 1: Line 1:
-watch -tn5 "conntrack -L -p udp --dport 53 | sort -nrk3; echo; conntrack -L -p tcp --dport 53 | sort -nrk3"+====== Actively monitor connections ====== 
 + 
 +There are cases where you want to monitor a specific type of connection going from/to/through your router. The following example tracks DNS requests towards name servers. 
 + 
 + \\ 
 + 
 +''watch -tn5 "conntrack -L -p udp --dport **53** | sort -nrk3; echo; conntrack -L -p tcp --dport **53** | sort -nrk3"'' 
 + 
 + \\ 
 + 
 +The number 53 refers to DNS. In the above case, it includes both udp and tcp. You can change this to any relevant port (for example, only 443) to change the command scope. 
 + 
 +For example: 
 + 
 +''watch -tn5 "conntrack -L -p tcp --dport 443 | sort -nrk3"'' 
 + 
 + \\ 
 + 
monitor_connections.txt · Last modified: 2023/09/10 20:09 by rs232