Configure UFW for Hugo

Simple Linux firewall settings for home computers

Easy Linux tips project recommends users to enable their firewall. However, this blocks all incoming traffic by default. If one wants to test the site on mobile devices, one will need to add a few rules to UFW.

$ sudo ufw allow ssh
$ sudo ufw allow http
$ sudo ufw allow https
$ sudo ufw allow 80/tcp
$ sudo ufw allow 1313/tcp comment "hugo server"

I learnt the last line from 竹内電設.

To extract the user-added rules, run ufw show added.

$ sudo ufw show added
Added user rules (see 'ufw status' for running firewall):
ufw allow 1313/tcp comment 'hugo server'
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
Hugo  Linux  UFW 

No comment

Your email address will not be published. Required fields are marked *.