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
Copy file name to clipboardExpand all lines: docs/Containers/WireGuard.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,11 +106,26 @@ You have several options for how your remote peers resolve DNS requests:
106
106
107
107
* `PEERDNS=auto`
108
108
109
-
The default value of `auto` instructs the WireGuard *service* running within the WireGuard *container* to use the same DNS as the WireGuard *container* when resolving requests from connected peers. In practice, that means the *service* directs queries to 127.0.0.11, which Docker intercepts and forwards to whichever resolvers are specified in the Raspberry Pi's `/etc/resolv.conf`.
109
+
DNS queries made on connected WireGuard clients should work as if they were
110
+
made on the host. If you [configure](Pi-hole.md#pi-hole-as-dns-server) your
111
+
ad-blocker into the host's `resolveconf.conf`, Wireguard clients will also
112
+
automatically use it.
113
+
114
+
Details: The default value of `auto` instructs the WireGuard *service*
115
+
running within the WireGuard *container* to use a DNS-service, coredns,
116
+
also running in the Wireguard container. Coredns by default directs queries
117
+
to 127.0.0.11, which Docker intercepts and forwards to whichever resolvers
118
+
are specified in the Raspberry Pi's `/etc/resolv.conf`.
110
119
111
120
* `PEERDNS=auto` with `custom-cont-init` <a name="customContInit"></a>
112
121
113
-
This configuration instructs WireGuard to forward DNS queries from remote peers to any **container** which is listening on port 53. This is the option you will want to choose if you are running an ad-blocking DNS server (eg *PiHole* or *AdGuardHome*) in a container on the same host as WireGuard, and you want your remote clients to obtain DNS resolution via the ad-blocker.
122
+
This configuration instructs WireGuard to forward DNS queries from remote
123
+
peers to any host daemon or **container** which is listening on port 53.
124
+
This is the option you will want to choose if you are running an
125
+
ad-blocking DNS server (eg *PiHole* or *AdGuardHome*) in a container on the
126
+
same host as WireGuard, and you want your remote clients to obtain DNS
127
+
resolution via the ad-blocker, but don't want your Raspberry Pi host to use
128
+
it.
114
129
115
130
> Acknowledgement: thanks to @ukkopahis for developing this option.
116
131
@@ -160,6 +175,9 @@ You have several options for how your remote peers resolve DNS requests:
160
175
```yml
161
176
- PEERDNS=192.168.203.65
162
177
```
178
+
Do note that changes to `PEERDNS` will not be updated to existing clients,
179
+
and as such you may want to use `PEERDNS=auto` unless you have a very
0 commit comments