LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Command for checking open ports? (http://www.linuxquestions.org/questions/linux-security-4/command-for-checking-open-ports-291152/)

Snipersnest 02-16-2005 08:23 PM

Command for checking open ports?
 
I was wondering if theres a command to check what open ports you have.

Ok many people know that counter-strike uses 27015 and 16.... But is there a command I could do in the terminal to list all the other open ports I could use?

Or a command to see what apps are using the current ports?

Fedora Core 2,3 and RH9

mAineAc 02-16-2005 08:31 PM

man netstat

speel 02-16-2005 08:31 PM

well you can download nmap ( or nmapfe if you want gui ) and port scan your self

sigsegv 02-16-2005 08:33 PM

man netstat

Snipersnest 02-16-2005 08:56 PM

Thanks!! helped me out big time... I needed an open port to put my HLTV on!

mastahnke 02-17-2005 12:00 AM

I thought we tried to stay away from 'man *' and RTFM in here.

Nmap is great for this.

Fedora and Red Hat both ship with an RPM for nmap.

$ nmap hostname

If you are on the machine and want to see open connections, (which are sometimes different than nmap, depending on if they are listening, or connected or whatnot) try

$ netstat -lnp

frieza 02-17-2005 12:11 AM

another good idea
www.grc.com and run 'shields up'
this website will port scan you and show you what you have open to the public as well

swamiji 02-17-2005 12:37 AM

Port 113 - How to shut down?
 
Title says it all. Using MDK 10.1 Official. Port scan shows only port 113 open after I installed the Shorewall Firewall that comes with the installation CD's.

However, there is no way to disable specified ports and so I can't shut down 113, which is shown by the "Shields up" web site as closed but not stealth.

Anyone know how to fix this, please?

Thanks, Swamiji

sigsegv 02-17-2005 08:58 AM

Quote:

Originally posted by mastahnke
I thought we tried to stay away from 'man *' and RTFM in here.
Do you have a mouse in your pocket? I personally prefer to *not* rewrite perfectly good documentation just to save someone the trouble of reading it ...

Swamiji -- Port 113 is ident which is typically used when connecting to IRC. Since most Linux firewalls are (incorrectly) set to drop packets, it would take a really long time for IRC connections to connect as the server would have to time out trying to connect to 113. So, 113 is closed (not accessible) but not stealthed.

Ports should generally be closed, not stealthed. "Stealthing" your computer does not hide it, including turning ICMP off.


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