LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NETSTAT utility - what does Local Address mean? (https://www.linuxquestions.org/questions/linux-networking-3/netstat-utility-what-does-local-address-mean-488136/)

PostEnlite 09-29-2006 08:28 PM

NETSTAT utility - what does Local Address mean?
 
There are 2 interface devices (eth0 internal, and eth1 external) on a Linux FC4.

'netstat -nap' produces 0.0.0.0:Port as the Local Address for an entry that is Listening (symbolic *:Port).

Which of the two devices does this refer to?

If this refers to both devices, then how can I start an application (e.g. named or telnet) to Listen strictly on eth0 and not on both?

All answers are greatly appreciated.

davimint 09-29-2006 10:11 PM

Being a newbie and not sure if I understand your goal maybe this will help

Code:

nmap -sT -O localhost
This should tell you what ports are listening for connections on your network.

win32sux 09-29-2006 10:13 PM

Quote:

Originally Posted by PostEnlite
There are 2 interface devices (eth0 internal, and eth1 external) on a Linux FC4.

'netstat -nap' produces 0.0.0.0:Port as the Local Address for an entry that is Listening (symbolic *:Port).

Which of the two devices does this refer to?

If this refers to both devices, then how can I start an application (e.g. named or telnet) to Listen strictly on eth0 and not on both?

All answers are greatly appreciated.

0.0.0.0 would mean that it's listening on all available addresses... to specify which address you want your program to listen on, it would depend on the program... usually it's just a matter of providing an option in a config file, or supplying a command-line option or something similar... as an example, to make squid only listen on localhost, you have a line like this in your squid.conf:
Code:

http_port 127.0.0.1:3128
then the netstat for it would look like:
Code:

win32sux@carly:~$ netstat -an | grep 3128 | grep LISTEN
tcp        0      0 127.0.0.1:3128          0.0.0.0:*              LISTEN

if i comment-out that line in squid.conf, then netstat looks like:
Code:

win32suxs@carly:~$ netstat -an | grep 3128 | grep LISTEN
tcp        0      0 0.0.0.0:3128            0.0.0.0:*              LISTEN



All times are GMT -5. The time now is 04:27 PM.