Hello, I would like to use kill switch feature for VPN in Ubuntu, i.e. to make it possible to access Internet only when I am connected to VPN and deny any access when I am without VPN. I have followed steps on the other website (replacing X.X.X.X with my VPN address and tun0 with wlan0), there were no errors in terminal but these settings don't work correctly. I cannot provide link to that other website because this forum does not let me do that. (Log in to hide this advertisement) When I have these rules enabled (sudo ufw enable) I cannot connect to VPN at all. There are also problems with correctly accessing websites outside VPN. How should I modify these commands? The second question is how can I restore original settings? Before applying these commands I could connect to VPN normally, now I need to disable ufw before doing that. I have tried removing ufw and iptables with "sudo apt-get remove" and then installing them again with "sudo apt-get install" but I have impression that it does not restore firewall settings to default. Thanks in advance! PS Full disclosure - this is cross-posting (I cannot provide link because this forum does not let me do that).