Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ubuntu with systemd-resolved. Computer is connected to the internet and work VPN. Work network has its own DNS and its own private hostnames resolvable only by its DNS but not by the public internet DNS. resolv.conf has nameserver entries for both networks, internet DNS first. When I am trying to resolve a private work hostname, internet DNS is connected first, returns not found error, and the name is not resolved. Works as designed - secondary nameserver should be contacted only in case of timeout or as round-robin, but obviously not the way I need it. My question is: how can I set it up to use work DNS to resolve private hostnames and internet DNS to resolve everything else? Essentially nameserver1 should be contacted if FQDN matches a domain list and nameserver2 if it doesn't. Obviously, I can set work DNS as primary - that's the workaround I am using now, but every time VPN is disconnected and reconnected systemd changes resolv.conf order back to default with internet first, also I am not comfortable with work DNS resolving all my requests to pron sites :)
Ubuntu with systemd-resolved. Computer is connected to the internet and work VPN. Work network has its own DNS and its own private hostnames resolvable only by its DNS but not by the public internet DNS. resolv.conf has nameserver entries for both networks, internet DNS first. When I am trying to resolve a private work hostname, internet DNS is connected first, returns not found error, and the name is not resolved. Works as designed - secondary nameserver should be contacted only in case of timeout or as round-robin, but obviously not the way I need it. My question is: how can I set it up to use work DNS to resolve private hostnames and internet DNS to resolve everything else? Essentially nameserver1 should be contacted if FQDN matches a domain list and nameserver2 if it doesn't. Obviously, I can set work DNS as primary - that's the workaround I am using now, but every time VPN is disconnected and reconnected systemd changes resolv.conf order back to default with internet first, also I am not comfortable with work DNS resolving all my requests to pron sites
Hi,
You could use a split dns configuration to resolve both internal and external hostnames
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.