Re: Determine open ports



ein a écrit :
On 03/14/2011 09:50 PM, Pascal Hambourg wrote:

ein a écrit :
Run 'netstat -l -p -n -t'. Example meanings;
Proto R-Q S-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
Means, that port 631/tcp is open on loopback interface.
Indirectly, because 127.0.0.1 can be used only on a loopback interface.

This is not true.

eth1 Link encap:Ethernet HWaddr 00:90:27:34:5e:ab
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
route:
eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0

You can *assign* a loopback address on a non loopback interface, but
cannot effectively *use* it.
Just try it. Any packet received or sent on a non loopback interface
from or to a loopback address will just be discarded by the kernel.
.