Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in the process of setting up a Ubuntu server on Amazon Web Services / EC2, which will need to host the following:

  • A relatively simple Java-based website (using the Noir framework)
  • A Java-based web service and REST API
  • Some method of logging in remotely via SSH or equivalent so I can administer the server

Before I open it to the public, what are the key steps I should take to ensure this type of server is secure?

share|improve this question
up vote 5 down vote accepted

Have a read of the answers on the Hardening Linux Server question for guidance on the server part.

Using EC2 shouldn't change your basic security concepts - but be aware of the implications of using a cloud service, especially in the following areas:

  • availability - for a single instance, you could find you have less control over availability
  • security of hypervisor - you have little control over their end so need to trust Amazon, but make sure your login to Amazon is protected at your end

SSH definitely is a good idea - and using certificates is recommended over solely using username and password.

As regards securing java - that could depend on a wide variety of factors. Possibly worth asking a separate question.

share|improve this answer

Dont overlook security groups in EC2 as well. It is good practice to firewall administrative ports like ssh (22) to just your ip. If you choose to leave ssh publicly reachable, think about installing fail2ban to prevent brute force attacks.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.