openvpn-gui icon indicating copy to clipboard operation
openvpn-gui copied to clipboard

[Request] Network lock

Open zero77 opened this issue 7 years ago • 3 comments

Can u add a network lock option where if enabled and open vpn is running, it blocks all network and internet access, when its not connected to a vpn. Thanks

zero77 avatar Mar 30 '17 14:03 zero77

Doing this in a reliable and generic way is hard. Further it would need admin rights while the GUI is supposed to be run with limited privileges.

In my view this is the job of the firewall. You can easily block all traffic through the LAN adapter except to the VPN servers/ports using a couple of lines of firewall rules. Then network access will become available only when the VPN tunnel is up.

selvanair avatar Mar 30 '17 20:03 selvanair

Doing this in a reliable and generic way is hard but not impossible. The principle should be similar to block-outside-dns. AFAIK AzireVPN client does this, maybe we should port the code from there.

ValdikSS avatar Jun 08 '17 07:06 ValdikSS

Windscribe VPN client has this feature, and it allows importing of custom configs. See here: https://blog.windscribe.com/windscribe-1-83-win-mac-changelog-6ae00c0e07cd

yegors avatar Jun 18 '19 15:06 yegors