manual-connections icon indicating copy to clipboard operation
manual-connections copied to clipboard

[feature request] autoreconnect when PIA connection drops

Open sifr01 opened this issue 3 years ago • 4 comments

It would be very handy if there was an autoREconnect feature. In other words, when the VPN connection drops, a daemon would be running to detect this VPN connection dropping and then automate reconnection attempts.

#while there is internet on the VPN interface, just keep pinging! 
while ping -I tun06 -c 1 -W 1 1.1.1.1; do
        sleep 1
done

#If theres no internet from the VPN interface, carry out connect command
sudo VPN_PROTOCOL=openvpn DISABLE_IPV6="no" AUTOCONNECT=true PIA_PF=false PIA_USER=p0123456 PIA_PASS=xxxxxxxx ./run_setup.sh

sleep 1s;

sifr01 avatar Sep 18 '21 17:09 sifr01

This would be great. I'm moving my server functions to containers and need an easy way to make sure the VPN auto connects at startup and reconnects if it drops, and allows LAN traffic. These options are present in the GUI but I can't use the GUI in the container.

belzebud avatar Oct 22 '21 22:10 belzebud

It would be very handy if there was an autoREconnect feature

I think this issue is actually a duplicate of https://github.com/pia-foss/manual-connections/issues/48. We should provide a folder with service files for systemd and also make sure they include a script that triggers a reconnect incase the VPN drops.

These options are present in the GUI but I can't use the GUI in the container.

These scripts do not plan to replace the GUI, or to offer all the functionality that is present within the Desktop app.

g00nix avatar Feb 19 '22 02:02 g00nix

honestly kind of dumbfounded this isn't already part of the scripts... why would anyone want their vpn to be able to drop and have virtually no clue its happened? with no killswitch setting at that... i know this is possible to do through openvpn without PIA or PIA's scripts, so why wouldn't this be included with the scripts?

i wonder how many people wrongfully think their devices connections are tunneled right now because they used these scripts..

proteanx avatar Mar 29 '22 02:03 proteanx

killswitch should be implemented with iptables or iproute2 separately, it's not in these scripts' scope.

Alternatively, you could use wireguard instead of openvpn which implicitly gives killswitch because the protocol is fundamentally connectionless - ironically, PIA's GUI clients (at least the Android one) don't seem to understand this.

triffid avatar Apr 20 '22 07:04 triffid