guriinii 0 Posted ... Hi All, I'm a network newb but I've managed to prevent internet connections outside of AirVPN when it is running but have no idea how to disable incoming and outgoing connections when not. I edited iptables as per the guide set here: https://airvpn.org/faq/software_lock Added this to ufw (which is the only rule present in gufw): sudo ufw allow out on tun0 from any to any Also, gufw is set to deny/deny. I'm stumped as to what to do outside of AirVPN, any suggestions? Thanks in advance. Quote Share this post Link to post
ulmwind 6 Posted ... So do you want to run kill switch on native Linux openvpn client? I recommend you to use up/down scripts to update iptables rules. The tip is how to dynamically update address of server in iptables rules.You can use special script #4 (https://www.raymond.cc/blog/automatic-vpn-kill-switch/). It is clumsy, but works.There is more elegant solution using group policy, integrated into iptables (https://habrahabr.ru/post/274445/). For router running Padavan or OpenWRT the task is trivial: https://airvpn.org/topic/20315-airvpn-configuration-on-xrmwrt-padavan-preventing-traffic-leakage-outside-tunnel/, https://airvpn.org/topic/20303-airvpn-configuration-on-openwrt-preventing-traffic-leakage-outside-tunnel/ Quote Share this post Link to post
guriinii 0 Posted ... Thanks for the advice but upon booting up this morning the internet doesn't work without the VPN. All sorted. I possibly didn't reboot to test the changes but I can't remember exactly. Quote Share this post Link to post