LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2010, 10:49 PM   #1
nobitavn
LQ Newbie
 
Registered: Sep 2010
Posts: 17

Rep: Reputation: 0
Netstat command output explanation.


Hi all,

When i typed netstat -lna, the output:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:580 0.0.0.0:* LISTEN
...
...


Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
unix 2 [ ACC ] STREAM LISTENING 23581
...
...

Can anyone explain to me:
1. What is "Active Internet connections" & "Active UNIX domain sockets"?
2. What is unix Proto?
3. Difference between LISTEN and LISTENING state.

I searched in google but i not found much information.

Thanks in advance.

Last edited by nobitavn; 10-12-2010 at 10:51 PM.
 
Old 10-12-2010, 11:02 PM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Here is a good tutorial I found a while back on using netstat:
http://linuxplanet.com/linuxplanet/tutorials/5633/1/
I think Proto is simply short for protocol.
 
Old 10-12-2010, 11:20 PM   #3
nobitavn
LQ Newbie
 
Registered: Sep 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Hi tommcd,

Thank you,I have read the website.
But I haven't found the answer yet.
Can you explain to me what is unix protocol? and what is Active UNIX domain sockets?

Thanks again.
 
Old 10-12-2010, 11:32 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Here ...

Let me google this for you ...

Link #2 looks VERY promising
 
Old 10-12-2010, 11:33 PM   #5
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by nobitavn View Post
Can you explain to me what is unix protocol? and what is Active UNIX domain sockets?
Well, for "Active Unix Domain sockets", according to that tutorial on linux planet:
Quote:
You can ignore everything under "Active UNIX domain sockets." Those are local inter-process communications, not network connections. To avoid displaying them at all, do this:
$ netstat --inet -a
This will display only network connections, both listening and established.
Since the unix protocol falls under the Active UNIX domain sockets, you can likely ignore all of that also.

Last edited by tommcd; 10-13-2010 at 01:00 AM.
 
Old 10-13-2010, 01:10 AM   #6
nobitavn
LQ Newbie
 
Registered: Sep 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Hi tommcd,

I got it, thank you so much.

Regards,
 
Old 10-13-2010, 01:22 AM   #7
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Glad I could be of help!
I am most definitely not any kind of a networking guru. But from a security standpoint, I have wondered about this also. Form my rather limited understanding, I have found that simply running:
Code:
netstat --inet -a
will yield the most useful info.
NOTE: If you have any bittorrent apps running, you will get a crapload of connections when you run netstat because it will list all of the users that are uploading or downloading your torrent files.
 
Old 10-13-2010, 05:06 AM   #8
nobitavn
LQ Newbie
 
Registered: Sep 2010
Posts: 17

Original Poster
Rep: Reputation: 0
Hi tommcd,

Thanks a lot.
When i run netstat --inet -anp. The result display:

Quote:
Local Address Foreign Address State
0.0.0.0:5801 0.0.0.0:* LISTEN
127.0.0.1:25 0.0.0.0:* LISTEN
192.168.81.23:1522 192.168.81.47:1646 ESTABLISHED
127.0.0.1:32791 127.0.0.1:1522 ESTABLISHED
What's mean of IP and port display?
From remote PC, i can connect to port 5802 and 1521 in this example.
But i can't connect to port 25 (Connection refused)

Thank you.
Regards,

Last edited by nobitavn; 10-13-2010 at 05:14 AM.
 
Old 10-13-2010, 11:21 AM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by nobitavn View Post
Hi tommcd,

Thanks a lot.
When i run netstat --inet -anp. The result display:



What's mean of IP and port display?
From remote PC, i can connect to port 5802 and 1521 in this example.
But i can't connect to port 25 (Connection refused)

Thank you.
Regards,

That's because it's only listening on the loop-back
interface, not the one bound to your ethernet/wifi card.

Have a look: http://lmgtfy.com/?q=127.0.0.1
 
  


Reply



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
Need explanation how does the output comes????? immadisetty Programming 7 03-03-2010 03:11 AM
Explanation of iwconfig output? SlowCoder Linux - Networking 1 05-21-2009 04:19 AM
wlan diag output explanation shinystuffrox Linux - Wireless Networking 1 01-17-2008 06:08 PM
netstat output rob.rice Linux - Networking 2 04-29-2007 09:18 AM
netstat -r command output juanb Linux - Networking 1 10-28-2004 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration