Hi,
I’ve recently installed PiVPN with dietpi-software
on my Raspberry Pi 4b where it runs beside AdGuard Home, and generally it works fine. I’ve established successful remote VPN connections to my “home lab” with it.
However, each time I reboot
DietPi, it stops working?
When I run systemctl status wg-quick@wg0.service
to check whether Wireguard gets launched on start up, it states that it’s indeed active.
Now, when I run pivpn -d
to debug, I each time get the same error:
:: [ERR] Ufw input rule is not set, attempt fix now? [Y/n]
When I confirm with Y
, it skips everything and simply relaunches Ufw, which I use as firewall:
Skipping inserting existing rule
Skipping adding existing rule (v6)
Firewall reloaded
It already did all the changes previously, but I get this error each time I reboot DietPi and run pivpn -d
.
Now, after it has skipped the Ufw changes and relaunched the firewall, the VPN service magically starts to work? I don’t get why.
Here’s the output from cat /etc/pivpn/wireguard/setupVars.conf
:
PLAT=Debian
OSCN=bullseye
USING_UFW=1
IPv4dev=eth0
IPv6dev=eth0
dhcpReserv=1
IPv4addr=192.168.178.18/24
IPv4gw=192.168.178.1
install_user=pivpn
install_home=/home/pivpn
VPN=wireguard
pivpnPORT=51820
pivpnDNS1=10.62.95.1
pivpnDNS2=
pivpnHOST=83.99.12.148
pivpnPROTO=udp
pivpnMTU=1420
pivpnDEV=wg0
pivpnNET=10.62.95.0
subnetClass=24
pivpnenableipv6=1
pivpnNETv6=“fd11:5ee:bad:c0de::”
subnetClassv6=64
ALLOWED_IPS=“0.0.0.0/0, ::0/0”
UNATTUPG=0
INSTALLED_PACKAGES=()
Here’s the ufw status
output:
51820/udp ALLOW Anywhere ← PiVPN
SSH ALLOW Anywhere
WWW Full ALLOW Anywhere
AdGuard Home Full ALLOW Anywhere
AdGuard Home Web Panel ALLOW Anywhere
8090/tcp ALLOW Anywhere
SSH (v6) ALLOW Anywhere (v6)
WWW Full (v6) ALLOW Anywhere (v6)
AdGuard Home Full (v6) ALLOW Anywhere (v6)
AdGuard Home Web Panel (v6) ALLOW Anywhere (v6)
8090/tcp (v6) ALLOW Anywhere (v6)
51820/udp (v6) ALLOW Anywhere (v6) ← PiVPNAnywhere on eth0 ALLOW FWD 10.62.95.0/24 on wg0 ← PiVPN
I usually login as root, but have installed PiVPN for another user pivpn, who currently doesn’t have sudo
privileges.
Any help is appreciated!