fast and secure web hosting. from a simple website to a highly visited e-shop  

grep

How to find the IPs connecting to my server?

The following command displays a list of the IPs that are connected to our server ignoring the STATE of the connection (CLOSE_WAIT, ESTABLISHED, etc)
netstat -tn 2>/dev/null
-t flag tells netstat to display only TCP connections and -n flag tells netstat command not to resolve IPs to hostnames While stderr (2) redirection (>) throws at "garbage" (/dev/null) means that we just don't want possible errors to break our cute output we are trying to make.
Subscribe to RSS - grep