Jump to content
Not connected, Your IP: 18.191.111.228
guriinii

How to disable incoming and outgoing connection when not running AirVPN?

Recommended Posts

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.

Share this post


Link to post

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/

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...