Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
command to list open ports?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kindred
n00b
n00b


Joined: 27 Feb 2004
Posts: 9

PostPosted: Fri Aug 20, 2004 9:15 pm    Post subject: command to list open ports? Reply with quote

The old admin left so I don't know what some server applications are using for ports, so what is the command to see?
Back to top
View user's profile Send private message
ElForesto
n00b
n00b


Joined: 26 Feb 2004
Posts: 26
Location: Salt Lake City, UT USA

PostPosted: Fri Aug 20, 2004 9:20 pm    Post subject: Reply with quote

This will list things being listened for:

Code:
netstat -l


If that doesn't give you what you want, check the man page. :)[/code]
Back to top
View user's profile Send private message
hensan
l33t
l33t


Joined: 26 Jun 2003
Posts: 868
Location: Sweden

PostPosted: Fri Aug 20, 2004 9:25 pm    Post subject: Reply with quote

You can also try nmap.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Aug 20, 2004 9:27 pm    Post subject: Reply with quote

hensan wrote:
You can also try nmap.


Yahp. nmap localhost
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Fri Aug 20, 2004 11:18 pm    Post subject: Reply with quote

netstat -ptln is a bit more readable IMO.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
krolden
Apprentice
Apprentice


Joined: 28 May 2004
Posts: 293
Location: Belgium

PostPosted: Fri Aug 20, 2004 11:44 pm    Post subject: Reply with quote

sdibb wrote:
hensan wrote:
You can also try nmap.


Yahp. nmap localhost


Won't that give incorrect results?

If your IPtables are configured that all packets from lo interface are to be accepted, you will see all your packets get through.
Besides, I don't think nmap can handle localhost, at least the older versions couldn't scan when giving 127.0.0.1 as target IP.

Anyways, check this out. It might prove convenient.
http://www.linuxsecurity.com/docs/LDP/Security-Quickstart-HOWTO/appendix.html#NETSTAT
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Sat Aug 21, 2004 3:45 am    Post subject: Reply with quote

Krolden wrote:
sdibb wrote:
hensan wrote:
You can also try nmap.


Yahp. nmap localhost


Won't that give incorrect results?

If your IPtables are configured that all packets from lo interface are to be accepted, you will see all your packets get through.
Besides, I don't think nmap can handle localhost, at least the older versions couldn't scan when giving 127.0.0.1 as target IP.

Anyways, check this out. It might prove convenient.
http://www.linuxsecurity.com/docs/LDP/Security-Quickstart-HOWTO/appendix.html#NETSTAT


Yes, you're right -- if you run it locally, it will display all the ports that are open that you locally can connect to, but not from the outside in. Still its a quick and dirty indication if you just want to know what's running.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum