Scripting

How to list connections on the server with netstat command

You can find the connections on the server using the following command. This will help us to determine if the server is under DDOS attack.

 
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

An example output of the mentioned command is given below:

 
 2 177.177.215.117
 2 207.46.13.148
 2 62.212.75.234
 2 66.249.78.201
 2 68.180.229.109
 2 86.98.48.85
 3 86.96.48.123
 6 122.174.220.250
 9 108.162.229.84
 10 141.101.89.173
 13 220.227.139.194

That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com

1 Comment

Click here to post a comment

  • They’ll also allow you too understand all the various features
    while also optimizing your computer. There is an selection for the Inbox, but since they’re
    originally entering the Inbox, then I aren’t seeing the reason why you would need this option. As a matter of fact, this article iss
    basically likely tto give you a few recommendations on how this matter can be takled legally.