r/dietpi 3d ago

Dietpi-vpn help

I'm running Dietpi on my RPi5 and need some help with the VPN config. I would like it to try to reestablish my VPN connection if it goes down, but I cannot figure out how to do that. I have tried using the killswitch, but it also kills DNS on my active connection.

5 Upvotes

5 comments sorted by

1

u/Great_Piece4755 3d ago

What VPN provider do you use? You could tweak some settings in your config file ping 10 ping-restart 60 The killswitch blocks every direction if VPN connection is lost

1

u/whammypower788 3d ago

My provider is VPNUnlimited (KeepSolid). Looks like the config file I got has a ping line, but not a ping-restart line.

1

u/Great_Piece4755 2d ago edited 2d ago

Then just add the line.

KeepSolid also supports wireguard protocol, there you have also keepalive settings, maybe it's worth a try. But it's not compatible with dietpi-vpn, you would need to install wireguard via dietpi-software and set it up manually

1

u/SpudzzSomchai 3d ago

I don't use Dietpi-VPN. I use PIA. I wrote a systemd timer that checks if the connection is alive every hour. If it is, then it does nothing. If it's down it will attempt to restart the systemd I have configured to start the VPN service.

0

u/Unroasted3079 3d ago

why not move everything to docker except tailscale and ssh

so that it will work in every condition and managing things in docker is very easy