Shell One-Liner : List IP addresses connected to your server on port 80

Linux One Liners

List all connected IP Addresses

 

 

List all connected IP Addresses on port 80

  • Netstat shows network status by listing open sockets.
  • -t is TCP sockets
  • -n is print symbolic host, port numbers
  • You can change the port number to see other kinds of traffic (ie: 443 for SSH traffic)
  • The Uniq command removes duplicate numbers
  • -c counts each line once, prefixing the number of instances
  • This script also sorts the IP addresses
  • The Sort command lists all the lines
  • -n Sorts arithmetically
  • -r Reverses the sort

 

See other Linux one liners here

How useful was this post?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 2

No votes so far! Be the first to rate this post.


3 thoughts on “Shell One-Liner : List IP addresses connected to your server on port 80

  1. Thanks on your marvelous posting! I seriously enjoyed reading
    it, you might be a great author.I will be sure to bookmark your blog and will come back from now on.
    I want to encourage you to ultimately continue your great posts,
    have a nice holiday weekend!

  2. You could certainly see your expertise in the work you write.
    The arena hopes for even more passionate writers such
    as you who aren’t afraid to say how they believe. At all times go
    after your heart.

  3. Heya i am for the first time here. I came across this board and I find It truly useful & it helped me out
    much. I hope to give something back and help others like you aided me.

Leave a Reply

Your email address will not be published. Required fields are marked *


Updated on July 22, 2023