Differences

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

Link to this comparison view

linux:system_administration [2014/12/15 15:00]
onno [Setting Up A VPN Tunnel]
linux:system_administration [2016/03/11 09:59] (current)
onno [Monitoring connections]
Line 463: Line 463:
 Also, see the file ''**/etc/services**'' to see which ports the services on the Linux computer are using. Also, see the file ''**/etc/services**'' to see which ports the services on the Linux computer are using.
  
 +Other netstat uses:
  
 +  * netstat -an | wc -l => current number of connections
 +  * netstat -an | grep :80 | wc -l => current number of connections through port 80 (web traffic)
 +  * netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n => what are the connections doing?
 +  * netstat -p =>  This returns the PID of the process that has the connection. It's also quite useful if you've got someone abusing a PID and you need to find out what IP it is so that you can get in touch with that individual or to block connections from that IP in the future. 
  
 +See also [[https://www.exchangecore.com/blog/find-number-active-connections-linux-using-netstat/|this site]] for more information.
  
 To see how the server looks from the outside (i.e. from a hacker's perspective), use nmap, which is a scanner available for both Windows and Linux computers. Don't forget to allow nmap to navigate through your (local) firewall. To see how the server looks from the outside (i.e. from a hacker's perspective), use nmap, which is a scanner available for both Windows and Linux computers. Don't forget to allow nmap to navigate through your (local) firewall.
Line 478: Line 483:
 nmap -A -T4 scanme.insecure.org nmap -A -T4 scanme.insecure.org
 </code> </code>
- 
- 
- 
- 
 ===== Troubleshooting Network Problems ===== ===== Troubleshooting Network Problems =====
  

Personal Tools