Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Restore killswitch functionality for linux. #184

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

djmwj
Copy link

@djmwj djmwj commented May 10, 2019

Changes:
Update iptables to generate correct rules.
Use connection logs to correctly handle openvpn random remote capability.
Handle custom DNS with killswitch.
Correctly restores iptables on exit.

Also has a commented out capability to allow people to enable network manager network status if desired. There may be better ways to do this however so its commented out for this PR.

Reference Feature request : autostart at boot & killswitch #69

…te correct rules.

Use connection logs to correctly handle openvpn random remote capeability.
Handle custom DNS with killswitch.
@Tamaranch
Copy link
Contributor

What is the purpose of iptables -A OUTPUT -o "$vpn_device_name" -p icmp -j ACCEPT ? Is it not included in iptables -A OUTPUT -o "$vpn_device_name" -j ACCEPT ?

@djmwj
Copy link
Author

djmwj commented May 11, 2019

Good catch, with iptables -A OUTPUT -o "$vpn_device_name" -j ACCEPT the other is redundant. I will update the pull request. Thanks!

@cbdejavu
Copy link

Is this at a point where it could be tested as a beta feature? When tried to clone what I thought was this release using

git clone "https://github.com/djmwj/protonvpn-cli"

It doesn't seem to have the -killswitch option. I'd love to test it as protonvpn is becoming less and less reliable and I need a way to prevent leakage. Even if there are issues that require my manual intervention to get the connection going again that is MUCH better than losing my connection daily and not knowing that it dropped for hours sometimes.

@Tamaranch
Copy link
Contributor

You have to run again sudo protonvpn-cli.sh --init in the cloned directory, and choose "yes" for killswitch, or you can simply do a sudo touch ~/.protonvpn-cli/.enable_killswitch.
Then, be sure to use this script, by reinstalling it, or running it in the cloned directory.

@cbdejavu
Copy link

Thank you. I thought I had done that but obviously I missed that. I'm thinking I possible didn't uninstall the other version first or something because when I ran init last time I didn't get the killswitch option. Thanks again for pointing me in the correct direction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants