steps to hardening linux server connected in public network

We having one internet leased line. we going to use that leased line in our proxy server (squid). for internet access we have assigned public IP to our proxy server. so we need to harden our Linux server security.

OS: Ubuntu server 9.10

Who is Participating?
MikeKaneConnect With a Mentor Commented:
Some basics:

Keep the root from being able to SSH into the box.  Ubuntu has that disabled by default and you should keep it that way.

Use complex passwords for your access accounts.  The longer the better and mix in capitals, numbers, and a special character.  

Use IPTables and restrict access into the host to only those ports you need.   Deny all else (make sure you keep your SSH access available though).

Use FailtoBan to set a timeout period for failed ssh attempts or some other mechanism to stop constant failed logon attempts.  

Uninstall and remove any services that you don't need/use.  

Always a good idea to keep patching up to date for security issues.  

up_grayed_outConnect With a Mentor Commented:
Are you married to Ubuntu? You might want to go with the debian netinstall. It's a very minimal install, so you're attack surface is going to be small. This way you only install the packages you need. You won't have to worry about shutting off services you're not using, becuase most of them won't be installed at all. I have a full Debian install for my desktop, and a minimal install for my servers. Whenver I read of new debian bugs, I update both. My desktop always needs updates, the servers rarely do.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.