Ask Your Question
0

Fixed dns (except for some networks) with NetworkManager

asked 2017-06-08 07:25:22 -0500

SettembreNero gravatar image

Hi guys, I want to use opendns for every network I connect to - except at home, where i want to use my personal PiHole dns settings. I couldn't find how to do that with NetworkManager, only how to leave resolv.conf unmanaged by NM -- but that prevents me to add specific settings for my home wifi.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-08 21:02:39 -0500

aeperezt gravatar image

Here how I did it, first you need to install dnsmasq then edit /etc/NetworkManager/NetworkManager.conf and add a line dns=dnsmasq then on /etc/NetworkManager/dnsmasq.d/ add a file for you network something like pihole.conf there you can add a like like server=xxx.xxx.xxx.xxx the ip of your dns settings. I use this kind of configuratio to set dns for some domains on vpn's. You resolv.conf set nameserver 127.0.0.1 for more infor look at https://wiki.archlinux.org/index.php/...

Hope this help

edit flag offensive delete link more

Comments

You can use it for specific domain adding server=/private.domain/dns_ip_address

aeperezt gravatar imageaeperezt ( 2019-02-07 09:32:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-08 07:25:22 -0500

Seen: 157 times

Last updated: Jun 08 '17