Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-06-2008, 01:55 PM   #1
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
Netstat syntax

I understand how netstat can be used to show used ports on a particular machine, but how would one use it to show used ports for an entire network?

To be more specific, I am configuring a proxy server and I want to use a port that is not used by the network, so I need a list of ports that are already in use.
Old 03-06-2008, 02:23 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
In brief: you can't.

Netstat will only display port/ip pairs for a) listening processes on
the machine it's invoked on or b) for established connections to the
machine it's invoked on.

To find all ports in use (unless of course stealthed by some firewall
product) you want to use nmap or some other port-scanner. Before you
do so make sure you're not in violation of any corporate policy.



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 ?? mickeyboa Fedora 2 11-06-2007 06:01 PM
netstat sanjaykhuntia Programming 6 11-02-2007 09:52 PM
C++ syntax error before :: token HELP, i cant find the syntax error :( qwijibow Programming 2 12-14-2004 06:09 PM
netstat -i r_213 Linux - Networking 4 09-09-2004 06:10 AM
netstat sopiaz57 Linux - Networking 1 10-14-2003 03:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:58 PM.

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