diff options
author | Stanislas <angristan@pm.me> | 2019-08-08 23:14:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 23:14:03 +0200 |
commit | 6fc7c44a876bfca1db513d523e588f08bebf0f5a (patch) | |
tree | 46a6ffd3ef446e53ee1f31d4bbdbb07f1fd436d0 /wireguard-install.sh | |
parent | 44ef24620ea21dd3f78fcd576adb5c29e8b818d6 (diff) | |
parent | dc3fb15a8a16f0799cf0645772a7fac3ef50270a (diff) |
Merge pull request #26 from outis151/patch-1
Fix compatibility issues with UFW Firewall
Diffstat (limited to 'wireguard-install.sh')
-rw-r--r-- | wireguard-install.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh index fd87f39..7c0ea87 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -120,8 +120,8 @@ echo "[Interface] Address = $SERVER_WG_IPV4/24,$SERVER_WG_IPV6/64 ListenPort = $SERVER_PORT PrivateKey = $SERVER_PRIV_KEY -PostUp = iptables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE -PostDown = iptables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE" > "/etc/wireguard/$SERVER_WG_NIC.conf" +PostUp = iptables -A FORWARD -i $SERVER_WG_NIC -j ACCEPT; iptables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -A FORWARD -i $SERVER_WG_NIC -j ACCEPT; ip6tables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE +PostDown = iptables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT; iptables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT; ip6tables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE" > "/etc/wireguard/$SERVER_WG_NIC.conf" # Add the client as a peer to the server echo "[Peer] |