Created
March 6, 2020 14:47
-
-
Save aamsur-mkt/0b47a41897b9b005028db6bedb7125f8 to your computer and use it in GitHub Desktop.
Show incoming connection and port via
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| netstat -ntu|awk '{print $5" "$4}'|cut -d ":" -f1,3 -s|sort|uniq -c|sort -nk1 -r | |
| # example output : | |
| 3 140.213.45.65:22 # 3 connection income to this server from ip 140.213.45.65 via port 22 | |
| 1 222.186.42.7:22 # 1 connection income to this server from ip 222.186.42.7 via port 22 | |
| 1 222.186.30.145:22 | |
| 1 172.19.0.3:9200 | |
| 1 172.19.0.2:51952 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment