Secure the Server
Turn on automatic security updates.
$ sudo dpkg-reconfigure -plow unattended-upgrades
Setup a firewall with ufw.
$ sudo apt-get install ufw $ sudo ufw default allow outgoing $ sudo ufw default deny incoming $ sudo ufw allow 22 comment 'SSH' $ sudo ufw allow http comment 'HTTP' $ sudo ufw allow https comment 'HTTPS' $ sudo ufw enable
Install fail2ban to secure your server
$ sudo apt install fail2ban
Configure fail2ban to Use ufw
Copy the main configuration to avoid unexpected changes during package updates.
$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Edit the configuration file with your favorite text editor
$ sudo nano /etc/fail2ban/jail.local
Change the banaction and banaction_allports settings to ufw in the file /etc/fail2ban/jail.local as follows: Continue reading “Install Discourse on Ubuntu 20.04” »