Closed hiiro74 closed 4 years ago
Which image tag are you using? latest or 0.0.20200320? If it's the first one, can you try with 0.0.20200320 ?
I cloned the git repository master branch which has sample configs under wireguard folder. The docker hub images dont have a default configuration.
The Kubernetes wireguard.yaml shown in the Overview on docker hub may also has the same issue I believe but I have yet to test it. Looking at wg0.conf its also the same as the one as the master branch on the git repository. The PostUp iptables should be almost identical to PostDown.
wg0.conf: |
[Interface]
Address = 10.33.0.1/24
ListenPort = 51820
PostUp = wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING -s 10.33.0.0/24 -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
# [Peer]
# PublicKey =
# AllowedIPs = 10.33.0.2/32
should be changed to
wg0.conf: |
[Interface]
Address = 10.33.0.1/24
ListenPort = 51820
PostUp = wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING -s 10.33.0.0/24 -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -s 10.33.0.0/24 -o eth0 -j MASQUERADE
# [Peer]
# PublicKey =
# AllowedIPs = 10.33.0.2/32
Oh I see. I'll be happy to merge a PR with these changes. But I can fix it for you if you want. Let me know and thank you for reporting :)
no problem, just informing you about it. You can just fix it since its just a very minor issue =)
There seems to be a problem with PostDown not removing iptables setting so I made changes to it on my end. Below is what I modified.