wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* DNS search domain support in wg-quick
@ 2019-09-26 18:40 Matt Layher
  2019-09-26 18:55 ` Matt Layher
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Layher @ 2019-09-26 18:40 UTC (permalink / raw)
  To: wireguard

I would like to add DNS search domain support to wg-quick and I have a 
working patch for Linux. It would look something like:

[Interface]
Address = fe80::2/128
PrivateKey = (redacted)
DNS = 192.168.1.1, fd00::1
DNSSearch = lan.example.com, lan.ipv4.example.com, lan.ipv6.example.com

I have a few questions to ask:

1) Is this something that we would like to have upstream? It appears it 
can also be done manually with a PostUp directive, but this also seems 
to wipe out the configuration set by the DNS key under the Interface 
section.

2) What is the policy for adding features like this across multiple 
platforms? It should be straightforward to port the change from Linux to 
FreeBSD and OpenBSD, but I'm unsure about Darwin and Android. Darwin 
appears to have a networksetup flag to do the trick, but the Android C 
changes would require much more scrutiny.

Thanks for your time,
Matt

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: DNS search domain support in wg-quick
  2019-09-26 18:40 DNS search domain support in wg-quick Matt Layher
@ 2019-09-26 18:55 ` Matt Layher
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Layher @ 2019-09-26 18:55 UTC (permalink / raw)
  To: wireguard

I probably should have tried this sooner, but yep, the PostUp works by 
stealing what wg-quick is doing with resolvconf, and if you also also 
set DNS nameservers in the same statement:

PostUp = echo -e "nameserver 192.168.1.1 fd00::1\nsearch lan.example.com 
lan.ipv4.example.com lan.ipv6.example.com" | resolvconf -a tun.%i -m 0 -x

- Matt

On 2019-09-26 2:40 p.m., Matt Layher wrote:
> I would like to add DNS search domain support to wg-quick and I have a 
> working patch for Linux. It would look something like:
>
> [Interface]
> Address = fe80::2/128
> PrivateKey = (redacted)
> DNS = 192.168.1.1, fd00::1
> DNSSearch = lan.example.com, lan.ipv4.example.com, lan.ipv6.example.com
>
> I have a few questions to ask:
>
> 1) Is this something that we would like to have upstream? It appears 
> it can also be done manually with a PostUp directive, but this also 
> seems to wipe out the configuration set by the DNS key under the 
> Interface section.
>
> 2) What is the policy for adding features like this across multiple 
> platforms? It should be straightforward to port the change from Linux 
> to FreeBSD and OpenBSD, but I'm unsure about Darwin and Android. 
> Darwin appears to have a networksetup flag to do the trick, but the 
> Android C changes would require much more scrutiny.
>
> Thanks for your time,
> Matt
>
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-26 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 18:40 DNS search domain support in wg-quick Matt Layher
2019-09-26 18:55 ` Matt Layher

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).