Skip to content

Do it in the following order:

Setting up default policies

$ sudo ufw default deny incoming
$ sudo ufw default allow outgoing

Allowing ssh connections

$ sudo ufw allow ssh

OR

sudo ufw allow 22

Allow connections for website

$ sudo ufw allow 80
$ sudo ufw allow 443

Allow connections for website

$ sudo ufw allow 80
$ sudo ufw allow 443

Allow connections for Outline VPN

$ sudo ufw allow 65162/tcp
$ sudo ufw allow 23221/tcp
$ sudo ufw allow 23221/udp

Enabling UFW

$ sudo ufw enable

Comments