Afterward make these changes should I still install a firewall in my Ubuntu?

The changes I done:

  1. Disable Root Login
  2. Disable Authentication Password
  3. Change port number SSH
  4. Enable login through SSH Key private/public

Should I install some firewall to protect more my Ubuntu 14.04? What is the best firewall?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

If you have ubuntu installed, then you already have a firewall installed because ubuntu includes UFW (uncomplicated firewall). You just need to enable it for the ports you are using… here are the commands for some of the more common ports as examples…

sudo ufw allow ssh (instructs firewall to allow port 22 ssh connections) sudo ufw allow 80/tcp (instructs firewall to allow port 80 http connections) sudo ufw allow 443/tcp (instructs firewall to allow port 443 https connections) sudo ufw allow 25/tcp (instructs firewall to allow port 25 smtp connections) sudo ufw show added (instructs firewall to show added connections) sudo ufw enable (enables firewall)

Hope that helps :)

Good luck!

You could ofcourse increase your server security. For example you could use:

  • Clamav - freshclam
  • Rkhunter
  • Fail2ban

And you could ofcourse use IPTables to setup a nice secure system. For example, I’ve setup IPTables to only allow incoming connections on important ports (ssh,ftp etc.) from my IP adress and block all other. That makes it alot more secure as well, you could ofcourse think of other ideas.