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 here (
https://www.privateinternetaccess.co...-ubuntu#Item_1), i.e. executed all the commands that begin with sudo in this one answer (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.
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!