[lug] Who is listening?

Hugh Brown hugh at math.byu.edu
Sun Jan 14 07:55:17 MST 2007


Daniel Webb wrote:
> I have been securing my sytems a bit, and noticed this:
> 
> $ netstat -lnp 
> 
> <...>
> tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN -                   
> <...>
> tcp        0      0 0.0.0.0:38574           0.0.0.0:*               LISTEN -               
> <...>
> 
> $ lsof -i TCP:2049
> $ lsof -i TCP:38574
> 
> The -p option to netstat gives the PID and process name for all other
> listeners.  How do I find out what these listeners are for?  On another system
> I have:
> 
> tcp        0      0 0.0.0.0:2494            0.0.0.0:*               LISTEN -                   


2049 is usu. nfs.  i'm guessing the rest are rpc related,
rpcinfo -p localhost
will give you all the port/process info for localhost.

Hugh



More information about the LUG mailing list