Results 1 to 3 of 3
Thread: Detect conections on the server
Enjoy an ad free experience by logging in. Not a member yet? Register.
Detect conections on the server
I have a Squid server with 40 machines.
How can i detect/list the conection on the server (cml)?
lsof -i TCP:3128
Is it right? it will list all the conections to squid port 3128?
Is there an alternative with netstat?
I want to make a bash script to list all the conection (all protocols) made in the lan port (eth0), how can i made this total conection by ip?
- Join Date
- Nov 2009
netstat -a |egrep 3128 might get you accurate results. I say "might" because 3128 might get trapped but it's not your server.
Have a look at /etc/services and see how port 3128 is defined, or not. If it is defined, change the egrep above to look for the name used.
If 3128 is not defined in /etc/services, define it and use "squid" as the service name. Define the same thing for both udp and tcp protocols.
On my system. 3128 is currently registered against something other than squid. In this case, I would define some other port for squid and configure my squid to use that one. Of course, you will have to adjust any other configs to now use your new port number rather than 3128.
If I am sure that the service currently defined against 3128 will not be used in my system, I would define 3128 again but with squid as the service name. Again, do it for both udp and tcp.
Cheers - VP