Skip to content

How to get dnsmasq and openresolv to find upstream DNS on Ubuntu 21.10? #8

Answered by chrisisbd
chrisisbd asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm, I think it's basically not going to work 'out of the box'. If I disable systemd-resolved and install (and run) dnsmasq then /run/dnsmasq/resolv.conf should have the nameserver(s) returned by DHCP in it, but it doesn't. I suspect that if I put dns=dnsmasq in NetworkManager.conf this is supposed to do what I want, but it doesn't (as you say Network Manager is far from perfect).

What I have done is as follows:-

Leave NetworkManager.conf at default, this means it puts "nameserver 127.0.0.1" in /etc/resolv.conf. Then I have added this one line to /etc/dnsmasq.conf "resolv-file=/run/NetworkManager/no-stub-resolv.conf", this file has the upstream DNS server in it.

Fairly simple but not as i…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@chrisisbd
Comment options

Comment options

You must be logged in to vote
1 reply
@rsmarples
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rsmarples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants