WireGuard Archive on lore.kernel.org
 help / color / 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, back to index

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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git