Skip to main content

Thread: bash script to print a list of established connections


i looked on net , couldn't find suitable. perfect if have conky , want see list of established internet connections without fluff in between:
code:
#!/bin/bash  ##############################################################################  # simple bash script show established connections    x="0"  in `netstat -n | grep "established"`;   x=$((x + 1))    if [ $x == 5 ];     if [[ $i != *'127.0'* ]] && [[ $i != *'192.168'* ]];      echo "$i"     fi  elif [ $x == 6 ];     x="0"   fi  done
the output this:
code:
72.127.xxx.xxx  42.78.xxx.xxx  98.54.xxx.xxx  ...etc, etc
enjoy

hello, know last post posted time ago, wondering how script have like, if want add "lsof -i :port" process information behind established ports , ip addresses?
can me out here?

example:
x.x.x.x:port/command:user:node:name (maybe, command+name)

thanks,
snitride


Forum The Ubuntu Forum Community Other Discussion and Support Tutorials bash script to print a list of established connections


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support