From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Eric Light <eric@ericlight.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Fixing wg-quick's DNS= directive with a hatchet
Date: Thu, 26 Oct 2017 05:21:38 +0200 [thread overview]
Message-ID: <CAHmME9p2GRzrT9-XZgVD921Ojxt88xKZOmg=rFh+ECJZ9gPYmA@mail.gmail.com> (raw)
In-Reply-To: <1508986442.581908.1151315616.1C72E382@webmail.messagingengine.com>
On Thu, Oct 26, 2017 at 4:54 AM, Eric Light <eric@ericlight.com> wrote:
> It looks ... really elegant to me. That said, it could end up being
> super confusing. I definitely second Kalin's comments about adding a
> comment header to /etc/resolv.conf.wg-quick.wg0
I thought it was a good suggestion too, so I implemented it. Here's
what it looks like:
zx2c4@thinkpad ~ $ wg-quick up martino
[#] ip link add martino type wireguard
[#] wg setconf martino /dev/fd/63
[#] ip address add 10.10.11.100/32 dev martino
[#] ip link set mtu 1420 dev martino
[#] ip link set martino up
[#] mount -Br /etc/resolv.conf.wg-quick.martino /etc/resolv.conf
[#] wg set martino fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev martino table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
zx2c4@thinkpad ~ $ cat /etc/resolv.conf
# This file was generated by wg-quick(8) for use with
# the WireGuard interface martino. It cannot be
# removed or altered directly. You may remove this file
# by running `wg-quick down martino`, or if that
# poses problems, run `umount /etc/resolv.conf`.
nameserver 10.10.11.1
zx2c4@thinkpad ~ $ wg-quick down martino
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] ip link delete dev martino
[#] umount /etc/resolv.conf
> All that's left is for me to hat-tip your Paulsen reference. I still
> have that book at home, probably been 20 years since I've read it.
> Linux certainly has an abundance of porcupines buried in the terrain.
:) Must have read it at least ten times as a kid...
next prev parent reply other threads:[~2017-10-26 3:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 22:43 Jason A. Donenfeld
2017-10-25 23:37 ` Kalin KOZHUHAROV
2017-10-26 0:55 ` Jason A. Donenfeld
2017-10-26 1:32 ` [PATCH] wg-quick: use bind mount for DNS when no openresolv Jason A. Donenfeld
2017-10-26 1:53 ` Kalin KOZHUHAROV
2017-10-26 1:54 ` Jason A. Donenfeld
2017-10-26 13:41 ` [PATCH v2] " Jason A. Donenfeld
2017-10-26 2:54 ` Fixing wg-quick's DNS= directive with a hatchet Eric Light
2017-10-26 3:21 ` Jason A. Donenfeld [this message]
2017-10-26 13:11 ` Jason A. Donenfeld
2017-10-26 16:56 ` Joe Doss
2017-10-26 17:24 ` Jason A. Donenfeld
2017-10-26 21:22 ` Jason A. Donenfeld
2017-10-27 10:07 ` Martin Hauke
2017-10-27 13:22 ` Jason A. Donenfeld
2017-10-27 14:47 ` Joe Doss
2017-10-27 14:51 ` Jason A. Donenfeld
2017-10-27 15:02 ` Jason A. Donenfeld
2017-10-27 15:38 ` Joe Doss
2017-10-27 22:04 ` Bruno Wolff III
2017-10-27 15:38 ` Joe Doss
2017-10-27 17:15 ` Jason A. Donenfeld
2017-10-27 17:52 ` Jason A. Donenfeld
2017-10-27 22:06 ` Daniel Kahn Gillmor
2017-10-28 2:24 ` Jason A. Donenfeld
2017-10-28 2:39 ` Jason A. Donenfeld
2017-10-28 14:35 ` Daniel Kahn Gillmor
2017-10-28 17:57 ` Jason A. Donenfeld
2017-10-29 12:21 ` Geo Kozey
2017-10-29 17:07 ` Jason A. Donenfeld
2017-10-30 11:58 ` Daniel Kahn Gillmor
2017-10-30 12:10 ` Daniel Kahn Gillmor
2017-10-29 22:06 ` Jason A. Donenfeld
2017-10-30 12:16 ` Daniel Kahn Gillmor
2017-10-31 10:49 ` Jason A. Donenfeld
2017-10-26 19:58 Geo Kozey
2017-10-26 21:11 ` Jason A. Donenfeld
2017-10-26 22:01 ` Geo Kozey
2017-10-26 22:19 ` Jason A. Donenfeld
2017-10-26 22:52 ` Geo Kozey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHmME9p2GRzrT9-XZgVD921Ojxt88xKZOmg=rFh+ECJZ9gPYmA@mail.gmail.com' \
--to=jason@zx2c4.com \
--cc=eric@ericlight.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).