From f0e9e87a1c2708e2fe42a239f959043b97b4321a Mon Sep 17 00:00:00 2001 From: yaestray <50524833+yaestray@users.noreply.github.com> Date: Fri, 10 May 2024 17:10:55 +0300 Subject: [PATCH] Update wg.conf --- templates/wg.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/wg.conf b/templates/wg.conf index 34891f0..e847b9e 100644 --- a/templates/wg.conf +++ b/templates/wg.conf @@ -9,7 +9,8 @@ ListenPort = {{ .serverConfig.Interface.ListenPort }} PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }} {{if .globalSettings.MTU}}MTU = {{ .globalSettings.MTU }}{{end}} PostUp = {{ .serverConfig.Interface.PostUp }} -PreDown = {{ .serverConfig.Interface.PreDown }} +PreUp = iptables --table nat --append POSTROUTING --jump MASQUERADE --out-interface eth0 +PreDown = iptables --table nat --delete POSTROUTING --jump MASQUERADE --out-interface eth0 PostDown = {{ .serverConfig.Interface.PostDown }} Table = {{ .globalSettings.Table }}