Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] <title> #294

Closed
1 task done
antoninchadima opened this issue Aug 22, 2023 · 2 comments
Closed
1 task done

[BUG] <title> #294

antoninchadima opened this issue Aug 22, 2023 · 2 comments

Comments

@antoninchadima
Copy link

antoninchadima commented Aug 22, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After upgrading to the latest version 1.0.20210914 (published five days ago and i think i skipped one version...) CoreDNS doesn't start - the logs show: "**** Disabling CoreDNS ****"

Expected Behavior

Before the upgrade CoreDNS did start- the logs show: ".:53 CoreDNS-1.10.1"

Steps To Reproduce

We would like to run the Wireguard Docker container in a "server mode" but i didn't set any corresponding environment variables, because i wanted to provide them via a externally modified wg0.conf
There are many Howtos on the internet doing it exactly the same way we did with the linuxserver/wireguard image and with a web ui, for example ngoduykhanh/wireguard-ui image.

But after upgrading to the latest version, CoreDNS didn't suddenly start.
I think it is this commit which changed the behavior: 3bcd753
(I understand, that it was changed to the preferred way of behavior)

I have expected a warning and how to workaround in the README.md or Versions changelog.

Is USE_COREDNS=true/false configurable via the docker environment variables?
This would be great.
Or you have to use the PEERDNS=auto/xxx environment variable to start the included CoreDNS server?
Or is enabling CoreDNS done completely another way?
Would be nice to have a simple description in the README.md in which conditions CoreDNS starts and in which not.

/config/wg0.conf

[Interface]
Address = 172.17.1.1/24
ListenPort = 51820
PrivateKey = WPTxxx=
MTU = 1420
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = xSTxxx=
PresharedKey = t+hxxx=
AllowedIPs = 172.17.1.2/32
[Peer]
...

/config/coredns/Corefile

. {
    forward . x.x.x.x
}

peer.conf

[Interface]
Address = 172.17.1.2/32
PrivateKey = cF4xxx=
DNS = 172.17.1.1
MTU = 1420
[Peer]
PublicKey = Y+dxxx=
PresharedKey = t+hxxx=
AllowedIPs = 0.0.0.0/0
Endpoint = xxx:51820
PersistentKeepalive = 25

Environment

- Debian 12.1
- Linux 6.1.0
- Docker 24.0.5 via Docker official repository

CPU architecture

x86-64

Docker creation

services:
wireguard:
    image: linuxserver/wireguard
    volumes:
    - etc:/config
    - /lib/modules:/lib/modules
    ports:
    - 51820:51820/udp
    restart: unless-stopped
    cap_add:
    - NET_ADMIN
    - SYS_MODULE
    sysctls:
    - net.ipv4.ip_forward=1
    - net.ipv4.conf.all.src_valid_mark=1
volumes:
  etc:

Container logs

...
**** Disabling CoreDNS ****
...
@github-actions
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@thespad
Copy link
Member

thespad commented Aug 22, 2023

It has been that way for a long time, if you don't set the necessary environment variables for server mode it assumes client mode and disables coredns.

USE_COREDNS=true can be set to override this behaviour but is entirely unsupported because it assumes you are doing something weird/advanced and have sufficient knowledge to solve your own issues, which is why it's undocumented.

@drizuid drizuid closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants