LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-06-2008, 01:55 PM   #1
tekmann33
Member
 
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
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
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.



Cheers,
Tink
 
  


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
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

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

All times are GMT -5. The time now is 03:04 AM.

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