I updated my Ubuntu 16.04LTS to 18.04LTS, first I noticed that systemd-networkd is colliding with dnsmasq because it's using the port 53. After some research, I learned that the systemd-networkd is a system daemon that manages network configurations. Of course, I want to solve my problem with the native tools that come with the distro, therefore, I wanted to configure systemd-networkd to do the same thing my dnsmasq did, redirecting DNS queries to a specific name server.

For example, the configuration I was using in dnsmasq for redirecting all the request that came on 'intranet' were going over the '' name server:


I was trying to do something similar with the network configuration in systemd-networkd with the options "DNS" for the DNS server and "Domains" for the domain I want to resolve over the name server:

Domains= ~intranet

I am not sure if its possible to actually do something like that in systemd-networkd and after reading the documentation and playing around with it I didn't come up with any solution, could someone help me with an example?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.