let's say you create a new instance on Amazon ec2 and you choose a default Ubuntu AMI. What things would you recommend for making the instance as secure as possible?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Elias: The quick answer is to decide which services you want to expose (ssh, http, https) and enable only those services on your machine. I usually assign ssh to a non-standard port (something other than port 22), as I've noticed brute force attacks occur there. Change the sshd port by editing /etc/ssh/sshd_config and restart the ssh service. Keep in mind that you can have a service running on the machine but still exclude access to it from via your security group.
Consider Fail2ban or alternatives to deflect brute force ssh attempts.
Don't overlook the obvious. I've watched attacks probe the standard LAMP stuff, checking for common passwords. Create user accounts with: sudo adduser --disabled-password, then copy your public key to the instance. Avoid services (ftp) that don't use a secure connection. My preference is to run web services over https rather than http.
I've not even scratched the surface, but if you apply a few commonsense procedures, you should avoid the most common generic attacks.