diff options
author | outis151 <outis151@gmail.com> | 2019-07-20 19:08:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-20 19:08:48 +0300 |
commit | dc3fb15a8a16f0799cf0645772a7fac3ef50270a (patch) | |
tree | cc517f5c3d0ae6749ee3223e62acddd38ca2f7f8 /wireguard-install.sh | |
parent | 4e6eeba5d014eb488173f4706ae9eb51a32e4612 (diff) |
Fix compatibility issues with UFW Firewall
This fixed no tunnel connectivity issue for me using UFW
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 b0bd456..8b92f3f 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -117,8 +117,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] |