Enable or disable ipv6 on ubuntu ufw

1 Min Read

Enable or disable ipv6 on ubuntu ufw netfilter firewall.

The /etc/default/ufw file is a high-level configuration file, to change default policies, and add IPv6 support and kernel modules.

sudo nano /etc/default/ufw

Edit the section in the file, change variable IPV6 to no.

# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback

# accepted). You will need to ‘disable’ and then ‘enable’ the firewall for

# the changes to take effect.

IPV6=yes

For disable change the variable to IPV6=no

Save changes and exit the file edit mode. As the description says the firewall needs to be disabled and then enabled to take effect..

Disable ufw:

sudo ufw disable

And then enable:

sudo ufw enable
Leave a Comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version