From 514a93411f8ff2e8c7bbd4b43a484f9eca880fe9 Mon Sep 17 00:00:00 2001 From: Nyr Date: Sat, 19 Jun 2021 14:00:12 +0200 Subject: [PATCH] Increase priority of wireguard-forward.conf Bugfix for some third party images. More information here: https://github.com/Nyr/openvpn-install/issues/848 Thanks @trivvz --- wireguard-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 1feb588..6f05441 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -376,12 +376,12 @@ ListenPort = $port EOF chmod 600 /etc/wireguard/wg0.conf # Enable net.ipv4.ip_forward for the system - echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/30-wireguard-forward.conf + echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/99-wireguard-forward.conf # Enable without waiting for a reboot or service restart echo 1 > /proc/sys/net/ipv4/ip_forward if [[ -n "$ip6" ]]; then # Enable net.ipv6.conf.all.forwarding for the system - echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.d/30-wireguard-forward.conf + echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.d/99-wireguard-forward.conf # Enable without waiting for a reboot or service restart echo 1 > /proc/sys/net/ipv6/conf/all/forwarding fi @@ -603,7 +603,7 @@ else fi systemctl disable --now wg-quick@wg0.service rm -f /etc/systemd/system/wg-quick@wg0.service.d/boringtun.conf - rm -f /etc/sysctl.d/30-wireguard-forward.conf + rm -f /etc/sysctl.d/99-wireguard-forward.conf # Different packages were installed if the system was containerized or not if [[ ! "$is_container" -eq 0 ]]; then if [[ "$os" == "ubuntu" ]]; then