LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 02-16-2005, 08:23 PM   #1
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Rep: Reputation: 30
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
 
Old 02-16-2005, 08:31 PM   #2
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
man netstat
 
Old 02-16-2005, 08:31 PM   #3
speel
Member
 
Registered: Apr 2004
Location: queens , nyc
Distribution: Slackware , Ubuntu
Posts: 349

Rep: Reputation: 30
well you can download nmap ( or nmapfe if you want gui ) and port scan your self
 
Old 02-16-2005, 08:33 PM   #4
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
man netstat
 
Old 02-16-2005, 08:56 PM   #5
Snipersnest
Member
 
Registered: Jan 2005
Location: SC
Distribution: Ubuntu 7.10 Gusty Gibbon
Posts: 269

Original Poster
Rep: Reputation: 30
Thanks!! helped me out big time... I needed an open port to put my HLTV on!
 
Old 02-17-2005, 12:00 AM   #6
mastahnke
Member
 
Registered: Feb 2002
Location: IL
Distribution: Ubuntu currently, also Fedora, RHEL, CentOS
Posts: 111

Rep: Reputation: 15
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
 
Old 02-17-2005, 12:11 AM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,111

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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
 
Old 02-17-2005, 12:37 AM   #8
swamiji
LQ Newbie
 
Registered: Nov 2003
Location: Arizona
Distribution: Mandrake Linux 9.1
Posts: 19

Rep: Reputation: 0
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
 
Old 02-17-2005, 08:58 AM   #9
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
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.
 
  


Reply


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
Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. Binxter Linux - Newbie 9 11-29-2007 03:03 AM
open ports on linksys, i have ssh open but thats it PlatinumRik Linux - Security 1 07-07-2005 11:38 AM
command(s) for checking ip status stupidloser Linux - Wireless Networking 5 08-10-2004 11:21 AM
checking memory usage from command line wrepti Linux - General 2 06-16-2004 11:24 PM
command for checking system resource usage? yeahoo7 Linux - Networking 3 06-12-2003 12:31 AM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration