Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Interface] DNS description incorrect #44

Open
shuffle2 opened this issue Apr 23, 2020 · 3 comments
Open

[Interface] DNS description incorrect #44

shuffle2 opened this issue Apr 23, 2020 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@shuffle2
Copy link

https://github.com/pirate/wireguard-docs/blob/master/README.md#dns-2

Currently it is described as if the setting will be somehow pushed/shared with peers. This is not the case. Instead, DNS servers listed in this key will just be populated on the local interface.

@pirate
Copy link
Owner

pirate commented May 1, 2020

Aha good to know, does wg do DHCP at all to assign IPs when clients have a range in AllowedIps, or do clients all self-assign their own?

@pirate pirate added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed and removed help wanted Extra attention is needed labels May 1, 2020
@shuffle2
Copy link
Author

shuffle2 commented May 2, 2020

wg doesn't do any dhcp itself. The config file only configures your local wg interface, and how your local wg client views other peers (this is why configs on both sides need to agree on settings, and settings local to each peer are what that peer actually uses to filter/route traffic)

@cocoon
Copy link

cocoon commented Jul 30, 2023

And it is missing the case that you can add a searchdomain.

See parsing of the go-client:

https://git.zx2c4.com/wireguard-windows/tree/conf/parser.go#n231

case "dns":
				addresses, err := splitList(val)
				if err != nil {
					return nil, err
				}
				for _, address := range addresses {
					a, err := netip.ParseAddr(address)
					if err != nil {
						conf.Interface.DNSSearch = append(conf.Interface.DNSSearch, address)
					} else {
						conf.Interface.DNS = append(conf.Interface.DNS, a)
					}
				}

Override DNS for Specific Domains

For example, if the resolver’s IP address is 10.0.0.2, and the domain name is internal.example.com, you might normally use the following DNS settting:

DNS = 10.0.0.2, internal.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants