You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I setup the container (using Portainer Stacks), everything works as expected, only SERVERPORT variable is being ignored; I set up SERVERPORT=1195, but I see the wg0.conf contains ListenPort = 51820 and also docker exec -ti wireguard wg displays that the process is listening at port 51820. It seems that the SERVERPORT directive is ignored when the config is recreated.
I tried to change some other values to trigger wg0.conf recreation (like SERVERADDRESS) and it regenerated successfully. So it is only SERVERPORT being ommited.
Please note that when I change server port in wg0.conf manually, everything works as expected. I'm also aware that this change will be lost on next config regeneration.
Expected Behavior
Both content of wg.conf and docker exec -ti wireguard wg should have the same server port as stated in Docker environment.
- OS:Ubuntu Server 22.04
- How docker service was installed: Clean setup based on docker-compose method as described on https://github.com/linuxserver/docker-wireguard/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Uname info: Linux 472f3c9f2fae 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64 GNU/Linux**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ******** Server mode is selected ******** PersistentKeepalive will be set for: all ******** External server address is set to REDACTED ******** External server port is set to 1195. Make sure that port is properly forwarded to port 51820 inside this container ******** Internal subnet is set to 192.168.70.0 ******** AllowedIPs for peers 172.100.0.0/16 ******** PEERDNS var is either not set or is set to "auto", setting peer DNS to 192.168.70.1 to use wireguard docker host's DNS. ******** Server mode is selected ******** No changes to parameters. Existing configs are used. ****[custom-init] No custom files found, skipping....:53CoreDNS-1.10.1linux/amd64, go1.20.11, **** Found WG conf /config/wg_confs/wg0.conf, adding to list ******** Activating tunnel /config/wg_confs/wg0.conf ****[#] ip link add wg0 type wireguard[#] wg setconf wg0 /dev/fd/63[#] ip -4 address add 192.168.70.1 dev wg0[#] ip link set mtu 1420 up dev wg0[#] ip -4 route add 192.168.70.2/32 dev wg0[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE**** All tunnels are now active ****[ls.io-init] done.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
When I setup the container (using Portainer Stacks), everything works as expected, only SERVERPORT variable is being ignored; I set up
SERVERPORT=1195
, but I see the wg0.conf containsListenPort = 51820
and alsodocker exec -ti wireguard wg
displays that the process is listening at port 51820. It seems that the SERVERPORT directive is ignored when the config is recreated.I tried to change some other values to trigger wg0.conf recreation (like SERVERADDRESS) and it regenerated successfully. So it is only SERVERPORT being ommited.
Please note that when I change server port in wg0.conf manually, everything works as expected. I'm also aware that this change will be lost on next config regeneration.
Expected Behavior
Both content of
wg.conf
anddocker exec -ti wireguard wg
should have the same server port as stated in Docker environment.Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: