From c048884a466463a7d9f76d4101804513e385d5e6 Mon Sep 17 00:00:00 2001 From: Wolfgang Date: Sat, 27 Mar 2021 14:42:38 +0100 Subject: [PATCH] Add 'Restart=on-failure' to wg-iptables systemd service On my machine the service sometimes fails to start on boot-up, which causes no Internet access upon connecting to the VPN. This should fix it --- wireguard-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index 1feb588..e566525 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -415,6 +415,8 @@ EOF Before=network.target [Service] Type=oneshot +Restart=on-failure +RestartSec=5s ExecStart=$iptables_path -t nat -A POSTROUTING -s 10.7.0.0/24 ! -d 10.7.0.0/24 -j SNAT --to $ip ExecStart=$iptables_path -I INPUT -p udp --dport $port -j ACCEPT ExecStart=$iptables_path -I FORWARD -s 10.7.0.0/24 -j ACCEPT