ufw – the 2 minute guide

apt-get install ufw

ufw allow ssh

but what do you know, i got an error

ERROR: initcaps
[Errno 2] modprobe: ERROR: could not insert 'ip6_tables': Unknown symbol in module, or unknown parameter (see dmesg)
ip6tables v1.4.21: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

Well, that was not so nice, so i went into the file /etc/default/ufw and disabled IPv6, and now it works

So, before we enable it, i enabled SSH access otherwise i will be locked out

ufw allow ssh

now, enable it with

ufw enable

Now, enabled a few more ports for website or SIP for example

I have a website under development, so i will want to open port 80 and 443 for my ip only ! I would like to delete those rules as my IP changes

ufw allow from 213.139.53.70
# and When my ip changes
ufw status numbered
ufw delete 4

Then add the new IP like in the first line

Leave a Reply

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