LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-22-2004, 10:57 AM   #1
zerofocus
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Question Where do i find a list of my ports?


Can some one tell me where to find a list of my ports on my linux redhat 9.0 server?

Also is there a list on the internet that discribes what each port is used for?

I need to lock down some unused ports and am kinda confused as which ones i really dont need and also which ones do i really need that i probably am unfamililar with. I know I have to leave ssh and apache open but are there other ones?

I'm going to be using this for a basic web server... I'm administrating it with webmin (https:10000) and the built in stuff that came with clark connection (https:81) This wont use email and wont need to do any thing fancy... I'm going to run Mysql and php on it and very very little perl if any.

This server is a clark connect distro and I positive it uses RedHat 9.0 as background work.. (hope I said that write.)

so if any one can refer me to any good sites that explain this it would be a great help. The threads on this forum have also been very helpful.

~Matt
 
Old 03-22-2004, 11:19 AM   #2
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 32
try 'netstat' not sure about parameters but something like 'netstat --listen' should display list of listening sockets I think.
 
Old 03-22-2004, 12:25 PM   #3
mgatny
Member
 
Registered: Mar 2004
Location: Ann Arbor, MI
Distribution: Debian, SuSE
Posts: 41

Rep: Reputation: 15
List TCP ports that are listening for connections, and the program that is running the daemon:
netstat -lt --program

Same thing for UDP:
netstat -lu --program

A mapping of service name to port number can be found in /etc/services. Refer to http://www.iana.org/ for more info.

You can also port scan yourself for open ports with a program like nmap (http://insecure.org/), which may already be installed on your system.

Some ports that get turned on by default that you probably want turned off:
lpd on port 515
portmapper on port 111 (unless you are mounting NFS volumes)
sendmail on port 25

If you want to stop services, and prevent them from starting on boot, here's an example using sendmail:
/etc/init.d/sendmail stop
chkconfig --del sendmail
 
  


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
List of unused ports on a machine linuxprogrammer Linux - Newbie 2 10-18-2004 02:20 PM
List of unused ports on a machine linuxprogrammer Linux - Newbie 4 10-18-2004 02:20 PM
List of unused ports on a machine linuxprogrammer Linux - Networking 1 10-18-2004 02:42 AM
list outgoing ports maenho Linux - Networking 2 10-05-2004 03:19 AM
List of IP connections and Ports sarmadys Linux - Networking 1 12-06-2001 12:26 PM


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