Proper way of modifying DNS server

I have a pihole on my local network I want to make use of. I have read tons in the topic of default DNS server setup so far, but I have 2 questions:

First question:
Some say openresolv is the way to go, others modify systemd-networkd things, add wired and wireless conf files etc.

I finally managed to get things going by using both openresolv and modifying /etc/systemd/resolved.conf directly. But I would really like to know what is the proper way to go?

Second question:
My router is my gateway with dnsmasq. I forwarded all dns requests for to my pihole. I also forwarded all traffic from LAN to the pihole.
I thought Manjaro should default to the router as DNS server (and then take advantage of the pihole without any manual setup required) through NetworkManager writing the nameserver/gateway IP into /etc/resolv.conf as nameserver). But apparently, it was not working like this. Am I missing something here?

If you want all your clients to go via pihole for DNS you basically have two options:

  1. In your routers DHCP server settings, set the pihole as DNS server. → each client will contact the pihole for DNS resolution (assuming all your clients are configured with DHCP)

  2. Manually define the DNS server for your internet connection to use the pihole instead of using your ISPs DNS server and keep using your router as DNS forwarder/resolver for the clients.

If you want to see the clients individual requests in the pihole UI you should go for 1).

Thanks, I already have this this high-level knowledge. My question was if (1) should really just work like that or no (because it was not working, and I could not decide if it was manjaro or openwrt-related), and how to actually configure manjaro to achieve (2).

As you sort of mentioned you have to choose between your resolv packages.
In the case of systemd-resolved+systemd-resolvconf I set it with the following:



Then link the resolvconf:

ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

And then set your custom DNS