-
-
Notifications
You must be signed in to change notification settings - Fork 437
Closed
Description
Expected Behavior
Changing INTERNAL_SUBNET in docker-compose.yml should change Address in .conf files
Current Behavior
Changing INTERNAL_SUBNET in docker-compose.yml server mode doesn't regenerate Address in peers .conf files
Steps to Reproduce
- Run docker-compose up with INTERNAL_SUBNET=10.0.0.0 to generate peers and client configs and stop docker-compose
- Change INTERNAL_SUBNET=10.2.2.2 and run docker-compose up
- Client configs are updated for AllowedIPs and DNS but not Address
Notes:
- Having wide subnet can be used to workaround this problem, or just edit the peers configuration files.
- "Problem" lays in https://github.com/linuxserver/docker-wireguard/blob/master/root/etc/cont-init.d/30-config#L187
- Other smaller issue: ListenPort for peers is not necessary when peers configs are generated in Server mode
Environment
OS: Ubuntu 20.04 LTS
CPU architecture: x86_64
How docker service was installed:
Command used to create docker container (run/create/compose/screenshot)
Edit docker-compose.yml and docker-compose up
Docker logs
wireguard | **** External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container ****
wireguard | **** Internal subnet is set to 10.2.7.0 ****
wireguard | **** AllowedIPs for peers 10.2.7.0/24 ****
wireguard | **** Peer DNS servers will be set to 10.2.7.1 ****
wireguard | **** Server mode is selected ****
wireguard | **** Server related environment variables changed, regenerating 1 server and user1,user2,user3 peer/client confs ****
...
wireguard | [#] ip link add wg0 type wireguard
wireguard | [#] wg setconf wg0 /dev/fd/63
wireguard | [#] ip -4 address add 10.2.7.1 dev wg0
wireguard | [#] ip link set mtu 1420 up dev wg0
wireguard | [#] ip -4 route add 10.2.5.3/32 dev wg0
wireguard | [#] ip -4 route add 10.2.5.2/32 dev wg0
wireguard | [#] ip -4 route add 10.2.3.4/32 dev wg0
Metadata
Metadata
Assignees
Labels
No labels
