Site Tools


monitor_connections

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
monitor_connections [2022/06/22 08:04] rs232monitor_connections [2024/10/31 21:44] (current) – -Formatting, condense hogwild
Line 1: Line 1:
 ====== Actively monitor connections ====== ====== 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.+There are cases where you want to monitor a specific connection type going from/to/through the router. The following example (run via SSH) 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 "53" refers to the port used for DNSIn the above case, both udp and tcp are included. 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"'' 
 + 
 + \\ 
  
-''watch -tn5 "conntrack -L -p udp --dport 53 | sort -nrk3; echo; conntrack -L -p tcp --dport 53 | sort -nrk3"'' 
monitor_connections.1655881446.txt.gz · Last modified: 2022/06/22 08:04 by rs232