Check Connections To Port 80 On Linux

View previous topic View next topic Go down

Check Connections To Port 80 On Linux

Post by jamied_uk on 4th July 2016, 15:51




Code:
sudo netstat -anp | grep :80 | grep ESTABLISHED | wc -l

Another method

Code:
sudo netstat -anp | grep -c 192.168.0.100:80


For Secure Traffic...

Code:
sudo netstat -anp | grep :443 | grep ESTABLISHED | wc -l

Code:
sudo netstat -anp | grep -c 192.168.0.5:443


For More

serverfault.com/questions/421310/check-the-number-of-active-connections-on-port-80


encrypted.google.com/search?q=linux+lisat+all+connections+to+port+80
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Check Connections To Port 80 On Linux

Post by jamied_uk on 5th July 2016, 12:32

Talking Function To Do Above



Edit your .bashrc

Code:
sudo gedit .bashrc

Code:
function webcount(){
echo -en "\e[92m\c"
sudo ballbags # to ask for password before it begins
clear
echo "Secure Web Connections " > webseccount.txt
cat webseccount.txt
cat webseccount.txt | espeak
sudo netstat -anp | grep :443 | grep ESTABLISHED | wc -l > webseccount.txt
cat webseccount.txt
cat webseccount.txt | espeak
echo "Standard Web Connections " > webcount.txt
cat webcount.txt
cat webcount.txt | espeak
sudo netstat -anp | grep :80 | grep ESTABLISHED | wc -l > webcount.txt
cat webcount.txt
cat webcount.txt | espeak
}

Usage:

Code:
webcount
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum