4 ms·
I'm using split horizon DNS with WireGuard on my systems (I mean using special DNS servers for some domain names and the public ones for the rest. Correct me if
by yuuta 5y ago
I'm using split horizon DNS with WireGuard on my systems (I mean using special DNS servers for some domain names and the public ones for the rest. Correct me if I'm wrong). I used to try systemd-networkd and systemd-resolved because they seem to fit together. I found systemd-resolved is extremely buggy with systemd-networkd managed WireGuard. My WireGuard endpoints use domain names and systemd-networkd fails to resolve them after a manual restart. I couldn't figure out why.
I also could not find a way to NOT combine split horizon DNS with network interfaces (like most documents online only include scenarios like resolving corporate domain names using a VPN interface but that wasn't my case). I have multiple VPN connections to the same network (runs BGP basically) and I did not want the split DNS to bind to some specified interfaces.
Moreover, systemd-resolved seems not able to do split DNS without systemd-networkd. It needs systemd-networkd managed interfaces to do that. What? I just want separate DNS servers for separate domains. My WireGuard interfaces are managed by wg-quick. Correct me if it is possible to use systemd-resolved standalone in this case.
The hard systemd-resolved dependency of systemd-networkd also had issues. Sometimes, I just want systemd-networkd to configure resolv.conf using DHCP DNS but it looks like I HAD TO START systemd-resolved AND LINK /run/systemd/stub-resolv.conf to /etc/resolv.conf in order to achieve that (correct me if there's a way to not use resolved completely). Excuse me?
systemd-networkd itself was buggy, too. I once encountered https://github.com/systemd/systemd/issues/18108 https://github.com/systemd/systemd/issues/18108 and my friends reported they faced this issue as well. I don't mean that software should not have bugs but encounter them is really inconvenient.
In conclusion, I mean, systemd components seem to fit together and help you do a lot of things, but they did't do the things well, compared to separate programs for their specified tasks. Moreover, you have to deal with various components of systemd and figure out their relationships in order to achieve some specified tasks. For split DNS, I'm using dnsmasq now and it's working pretty well.