LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-09-2004, 09:15 AM   #1
smita
LQ Newbie
 
Registered: Jun 2004
Posts: 4

Rep: Reputation: 0
how to find network ports


how should i find out wht network ports are currently being used in my machine;and how to find my machines static routes too?
 
Old 06-09-2004, 09:47 AM   #2
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
netstat -na for all activity

netstat -na|grep LISTEN for TCP listening ports

route -n or see more netstat options

you can also use "lsof" if you have it installed.
 
Old 06-09-2004, 10:04 AM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Adding to linuxxed's post ...

#netstat -nr

will give you the routes. #route -nv too will.

#netstat -l

will give you the ports that are listening. Adding the p option

#netstat -lp

will show the list of ports that are soliciting connection and the services that are listening on the ports.

Last edited by ppuru; 06-09-2004 at 10:06 AM.
 
  


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
Find open ports and close them geodo Linux - Newbie 7 11-18-2004 09:33 PM
Find Blocked Ports on Network artielnx Linux - Newbie 2 09-30-2004 03:01 PM
IPcop: How do I open ports for all of the green network? Moses420ca Linux - Networking 0 07-26-2004 01:23 PM
com ports, how do I find and ensure they are working Crasherz Linux - Newbie 1 04-09-2004 03:14 AM
Where do i find a list of my ports? zerofocus Linux - Security 2 03-22-2004 12:25 PM

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

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