Amazon EC2 Total Connection Lost


Trying to set up another Drupal site on free tier of Amazon cloud, the feeling and setup are all good! After setting up LAMP stack, suddenly received an email from Amazon that I recently reached a limit on the volume of email I was able to send out of SMTP port 25 on my instance. I was shocked on the one hand worrying about if my webserver was compromised and on the other hand questioned why the Security Group pre-set by Amazon EC2 did not work according to my expectation. It led me to enable the firewall of my linux, i.e. CentOS 6.


Although open the specific port for webmin on the linux firewall, I forgot to open the SSH port 22, it caused a tragic connection lost to the virtual machine. That is, it could neither be connected through SSH login nor webmin. That may be caused by incorrect set up of the firewall rules such that the specific port for webmin was unexpectedly blocked.


  • Terminate the virtual machine and set up a new instance.
  • Use webmin’s standard linux firewall rules and add some ports, but not other rules.


  • EC2 micro-tier
  • CentOS 6.4
  • Webmin 1.620