Re: [OT] Port numbers
On Thu, Jul 12, 2001 at 12:24:17AM -0500, will trillich wrote:
> How do you determine WHICH NETWORK SERVICES ARE OPEN (active)?
> Try "netstat -a | grep LISTEN". To see numeric values (instead
> of the common names for services using a particular port) then
> try "netstat -na" instead. For more info, look at "man netstat".
As root, you can also use the '-p' option to netstat, to display
the process id/name that is attached to the open port.
> Curious about your NETWORK TRAFFIC? There's a whole bunch of
> ways to monitor it: iptraf, showtraf, netwatch, tcpview, statnet,
> or even
> tcpdump | grep 'what you want to see'
tcpdump has its own filter, which is much more effective in
terms of resource usage. It actually compiles a filter from
the specification you give it on the command line.
Example:
tcpdump host foo
tcpdump not port ssh
tcpdump port 53
tcpdump arp
> lsof -i | grep 'LISTEN'
lsof is different from the other tools you mention. It does not
Cheers,
Joost
Reply to: