LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-17-2013, 07:04 PM   #1
johntravolta
LQ Newbie
 
Registered: Jun 2013
Posts: 1

Rep: Reputation: Disabled
Netstat command help


I am working on an assignment for a class on Linux OS using Fedora and I am having difficulty with this section. The first part is simple, I am to use the netstat command [netstat -anp | grep " LISTEN "] which generates a list of services with ip address and port numbers.

The next part says, "Identify the name of the services (Protocol / Name AND Port Description) using www.google.com and typing "site: auditmypc tcp XXX" where XXX is a port number from the list generated from the netstat.... command."

I'm confused on this for quite a few reasons. 1st is that I was under the impression that websites went through port 80, so why shouldn't I just be using that as the port number. 2nd is I'm not sure how to read the netstat list as it displays; the first part shows a series of "tcp 0 0 0.0.0.0:45967 0.0.0.0:* LIST" followed by a long list of services (firefox is in the list as "unix 2 [ACC] STREAM LISTENING 19954 2413/firefox /tm)

I have not been able to find any variation of the netstat command that will the "site: auditmypc tcp xxx" section.
 
Old 06-17-2013, 07:37 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Quote:
Originally Posted by johntravolta View Post
I am to use the netstat command [netstat -anp | grep " LISTEN "] which generates a list of services with ip address and port numbers.
That probably should read
Code:
netstat -anptl
as that only reports TCP services in the listening state and doesn't require grepping for it...


Quote:
Originally Posted by johntravolta View Post
I was under the impression that websites went through port 80, so why shouldn't I just be using that as the port number.
Because the exercise is to see what services listen? While the IANA default (/etc/services) for HTTP is TCP/80 there's nothing keeping a site from using port TCP/81, TCP/8123 or any other TCP port. Besides the Internet wasn't built on WWW only.


Quote:
Originally Posted by johntravolta View Post
2nd is I'm not sure how to read the netstat list as it displays; the first part shows a series of "tcp 0 0 0.0.0.0:45967 0.0.0.0:* LIST" followed by a long list of services (firefox is in the list as "unix 2 [ACC] STREAM LISTENING 19954 2413/firefox /tm)
See 'man netstat' the "OUTPUT" section.


Quote:
Originally Posted by johntravolta View Post
I have not been able to find any variation of the netstat command that will the "site: auditmypc tcp xxx" section.
You're supposed to submit the "site: auditmypc tcp xxx" query to your favorite search engine.
 
  


Reply


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
about the netstat command kellyseeme Linux - Newbie 6 01-01-2013 07:38 AM
More about netstat command gubak Linux - Networking 1 11-30-2009 07:28 AM
netstat command sunils1973 Linux - Networking 3 11-24-2009 07:59 AM
Netstat command Panagiotis_IOA Linux - Networking 2 03-13-2006 12:56 PM
Netstat command scottpioso Linux - Networking 14 09-06-2003 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:05 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