0

In 24.04, I have multiple network interfaces - my home WiFi, and then a separate ethernet interface (really, a LTE modem that presents an ethernet device) which has access to my employer's network.

I split the traffic so that everything for my employer's subnet goes via their device, everything else via my home network. I do this using the network manager GUI, by setting the appropriate subnet, etc. in the "Routes" section, under the IP4 tab for the ethernet device.

It works great, except that I periodically get issues with resolving hostnames that are specific to my employer's network. If I override all DNS settings, and just point them to the ethernet device's gateway, it all works fine, but I would prefer not to do all of my DNS resolution through my employer.

What is best practice, in terms of both setting the DNS servers to use, and the precedence order, such that it first tries DNS resolution on the default device, and then falls back to the ethernet device if present?

1 Answer 1

0

The best practice is to define connection or interface specific domains. For example if your Ethernet has private example.net domain, then include example.net in ipv4.dns-search in network manager. Include all domains having special content. Works both with NM integrated dnsmasq and systemd-resolved.

By using specific domains, you can direct only part of resolution to your local resolver. You can have more than one site enabling VPN this way. Default resolution would go to default interface.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .