]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
man: update wg-quick(8) to show Debian resolvconf braindamage
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 22 May 2017 11:28:02 +0000 (13:28 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 30 May 2017 16:07:28 +0000 (18:07 +0200)
While OpenResolv supports explicit ordering directives such as `-m` and
exclusivity directives such as `-x`, Debian's own resolvconf supports
none of this, instead using a hard coded list of interface name
templates for determining ordering. While trying to emulate `-x` is
difficult [*], we can at least try to mostly emulate `-m 0` by
masquerading as a `tun*` interface to resolvconf. Ugly, but it works.

[*] One heavy handed way of emulating `-x` would be something like:

   # echo nameserver 8.8.8.8 > /etc/resolv.conf.wg0-exclusive
   # mount --bind -o ro /etc/resolv.conf.wg0-exclusive /etc/resolv.conf
   # rm -f /etc/resolv.conf.wg0-exclusive

This in practice works quite well, but is a bit heavy to put in a man
page. It also doesn't "stack" well. For example, if we simply run
`umount /etc/resolv.conf`, how do we know which resolv.conf entry we're
unmounting?

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick.8

index fcc855c21d9f73014b98f13a0b8bedd9263e9160..ceee0269357a4cdc2f3cc34eaeb2d17832d37cd2 100644 (file)
@@ -98,9 +98,9 @@ traffic:
 .br
     \fBAddress = 10.200.100.8/24\fP
 .br
-    \fBPostUp = echo nameserver 10.200.100.1 | resolvconf -a %i -m 0 -x\fP
+    \fBPostUp = echo nameserver 10.200.100.1 | resolvconf -a tun.%i -m 0 -x\fP
 .br
-    \fBPostDown = resolvconf -d %i\fP
+    \fBPostDown = resolvconf -d tun.%i\fP
 .br
     PrivateKey = oK56DE9Ue9zK76rAc8pBl6opph+1v36lm7cXXsQKrQM= 
 .br