LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-29-2006, 08:28 PM   #1
PostEnlite
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
Question 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.
 
Old 09-29-2006, 10:11 PM   #2
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
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.
 
Old 09-29-2006, 10:13 PM   #3
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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

Last edited by win32sux; 09-29-2006 at 10:18 PM.
 
  


Reply

Tags
listen, netstat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netstat - Why is it truncating the foreign address? lukasbradley Linux - Software 4 09-25-2013 06:00 PM
how to obtain someone's ip address through netstat dr_zayus69 Linux - Networking 5 08-13-2005 11:06 PM
netstat reporting wrong IP address? Donboy Linux - Networking 2 04-14-2005 12:44 AM
netstat foreign address abbreviated eliotstock Linux - Networking 1 10-17-2004 04:42 PM
netstat, how to show what address are connected? trey85stang Slackware 2 12-30-2003 02:56 PM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration