Comments (13)
from docker-wireguard.
I also have the high CPU usage from coredns when running this image out of the box. The command I'm using to create the container is:
docker create --name=wireguard --cap-add=NET_ADMIN --cap-add=SYS_MODULE -e PUID=1000 -e PGID=1000 -e TZ=<mytz> -e SERVERURL=<mydomain> `#optional` -e SERVERPORT=51820 `#optional` -e PEERS=1 `#optional` -e PEERDNS=auto `#optional` -e INTERNAL_SUBNET=10.13.13.0 `#optional` -p 51820:51820/udp -v /wireguard/config:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" --restart unless-stopped linuxserver/wireguard
What am I doing wrong? I tried changing
PEERDNS=auto
toPEERDNS=<my router ip>
but it made no difference.
sorry for the delays but we've only just recently determined the root cause, thanks to user Tokugero on discord. The issue is that when you use docker create, as you did here without specifying a docker network, it will use the default bridge network which does NOT support docker dns. In compose, this is not an issue, with docker run
or docker create
, you must specify the user-defined docker network you created. You can also simply set PEERDNS=8.8.8.8
or something.
We are updating the application setup section in the readme to address this.
from docker-wireguard.
specifically, the docker dns address we used, 127.0.0.11
, is not present in the default bridge network (or host networking). That's why coredns was going crazy.
We have a fix now, which will tell coredns to use the /etc/resolv.conf
info instead rather than the hardcoded 127.0.0.11
. Existing users will have to delete their /config/coredns/Corefile
and restart after updating the image to the next build.
from docker-wireguard.
I'm experiencing the same issue.
Edit:
Using docker-compose template - coredns seems to be used when PEERDNS is set to auto ?
Couldn't be a way to disable coreDNS with an env variable ?
from docker-wireguard.
Found it !
CoreDNS config was pointing to itself, which lead to infinite loop
@mr-cn
Check your config/coredns/Corefile
. {
forward . 127.0.0.11
}
And point to another DNS
Example
. {
forward . 8.8.8.8
}
Edit: Formatting
from docker-wireguard.
It's not pointing to itself. It's pointing to the docker dns resolver, 127.0.0.11
, which should forward requests to whatever dns resolver is set by the docker system (likely host)
from docker-wireguard.
Running /app/coredns
from container gives me this for each query
[INFO] 127.0.0.1:53456 - 63497 "A IN <whatever_domain>. udp 34 false 512" NOERROR qr,aa,rd 106 0.000091121s
Note: container is mapped with host network
from docker-wireguard.
Note: container is mapped with host network
That would be why you're having issues
from docker-wireguard.
Found it !
CoreDNS config was pointing to itself, which lead to infinite loop
@mr-cn
Check yourconfig/coredns/Corefile
. { forward . 127.0.0.11 }
And point to another DNS
Example
. { forward . 8.8.8.8 }
Edit: Formatting
For the avoidance of doubt this quoted post is incorrect.
To expand on @aptalca reply docker has an internal DNS system which presents as a loopback within each container on 127.0.0.11
. This allows you to lookup both public DNS (via hosts resolver) and internal docker DNS e.g. other container names.
If you make the change listed above you will fundamentally break internal docker lookups.
Unless you absolutely understand what this means and actually need to break it then do not do this.
from docker-wireguard.
I also have the high CPU usage from coredns when running this image out of the box. The command I'm using to create the container is:
docker create
--name=wireguard
--cap-add=NET_ADMIN
--cap-add=SYS_MODULE
-e PUID=1000
-e PGID=1000
-e TZ=<mytz>
-e SERVERURL=<mydomain> `#optional`
-e SERVERPORT=51820 `#optional`
-e PEERS=1 `#optional`
-e PEERDNS=auto `#optional`
-e INTERNAL_SUBNET=10.13.13.0 `#optional`
-p 51820:51820/udp
-v /wireguard/config:/config
-v /lib/modules:/lib/modules
--sysctl="net.ipv4.conf.all.src_valid_mark=1"
--restart unless-stopped
linuxserver/wireguard
What am I doing wrong? I tried changing PEERDNS=auto
to PEERDNS=<my router ip>
but it made no difference.
from docker-wireguard.
from docker-wireguard.
I've had the same problem. try changing your Corefile in /coredns. Like this example:
$ cat Corefile
.:5353 {
wgsd example.com. wg0
}
https://coredns.io/explugins/wgsd/
from docker-wireguard.
@vimania what exactly does that do and how does it work?
from docker-wireguard.
Related Issues (20)
- [FEAT / BUG] <Modifiable 'ListenPort' used by host/wireguard incoming connections through docker configuration> HOT 8
- [BUG] Custom Server Port not taken into account in server.conf template HOT 3
- [BUG] starting with ~v1.0.20210914-ls116 cannot connect to wireguard HOT 3
- [BUG] Error generating QRCode - qrencode: command not found HOT 2
- [BUG] -ls23 and onwards has issue with adding iptables rules HOT 6
- [BUG] iptables v1.8.10 (legacy): can't initialize iptables table `filter' HOT 4
- [BUG] Conneted to the Wiregurad server, but no network connection on client side. HOT 3
- [BUG] Client IPs are all the container's host HOT 15
- [BUG] missing /32 in interface address HOT 14
- [FEAT] Enable SERVER_ALLOWEDIPS_PEER_ declaration by comma HOT 9
- Old tags are wrong HOT 4
- [BUG] ListenPort = 51820 in default peer.conf disallows >1 peer through NAT loopback HOT 11
- [FEAT] [Peer] definition within generated wg0.conf should be templated HOT 10
- Setting SERVERPORT has no effect HOT 5
- [BUG] Setting SERVER_ALLOWEDIPS_PEER_ does not recreate configs HOT 2
- [BUG] busybox's modprobe fails to load kernel module HOT 1
- [FEAT] IPv6 subnet support HOT 3
- [BUG] Dual-stack IPv6 traffic is not dropped and therefore spoiling the true origin of packets HOT 1
- [FEAT] Enable logging in CoreDNS HOT 3
- [BUG] dosent work in ubuntu server HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-wireguard.