RimuHosting: Mighty Linux Servers.  Support Worth Raving About
Plans & Pricing
Server Recommendation Tool
Server Types
  VPS
  Semi-dedicated Server
  Dedicated Server
Server Locations
  Dallas
  London
  Australia
VPS Technology
Hardware
Data Centers
Linux Distributions
Applications
Maintenance Notices
Support Ticket
Control Panel
HOWTO Articles
Forums
VPS control panel
Billing details
Receipts
Contact details
DNS
Reverse DNS
Console-over-SSH
FTP backup space
Backup mail server
About
Staff
News
Customer Testimonials
Sales Inquiry
Link To Us
Terms and Conditions
Site Map

Order VPS Hosting
Order a VPS, Semi- dedicated or Dedicated server in Dallas, London or Australia.

Get Assistance
Ask our support team about your hosting requirements.


Host where the staff takes pride in making customers happy

Just a little surprise to say thank you for all your hard work on the servers. The help is very much appreciated and there's no way this could have happened without it. You guys at Rimu are AWESOME! I'm not sure what your gaming tastes are, hopefully there's something here you'll like.

- Tom (in a note in a parcel of four games he had couriered to us. Thanks for the surprise Tom!) (#1/269)
Home > Support > HOWTO List > Linux > Ports

Working with Linux howtos

Securing Your Server: Is Your Port Showing?

Want to harden the security on your server?  The first thing you should do is shut down any public services that you don't need.

To see the ports on which you are accepting connections (sshd, http, ftp, etc) , run "netstat -l" (-l for ports that are listening). 

You should be interested in both what ports are open, and on what addresses is your server listening.  e.g. listening on the localhost address is usually pretty harmless.  But you'd want to make sure that anything listening on a public (or *) IP address is supposed to be publicly accessible

If you see a port number that you don't recognise, run lsof | grep theportnumber.  This will tell you the process listening on this port.

The xinetd daemon controls a number of services (like FTP, pop3, et al.).  If you don't want them running a) shutdown xinetd or b) configure that service by editing the appropriate file in /etc/xinet.d/ and setting "disable = yes".

Tip: To quickly find enabled services, run: grep -i disable /etc/xinetd.d/* | grep -i no

NMap

Want to perform a security scan on your server?

Download and install nmap from Insecure.org.  e.g. rpm -Uvfh "http://download.insecure.org/nmap/dist/nmap-3.28-1.i386.rpm" Then run it against your server: nmap yourservername.com.  It will scan the most commonly used port numbers on your server and alert you to open ports.  Like this:

Port       State       Service
21/tcp     open        ftp
22/tcp     open        ssh
25/tcp     open        smtp
80/tcp     open        http