Configure a service to run at startup in Ubuntu

To automatically start a service like apache, nginx, fail2ban or others after a reboot you can do the following:

sudo update-rc.d fail2ban defaults

If the service is already set to be automatically restarted you will see the following:

System start/stop links for /etc/init.d/fail2ban already exist.