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.
I have a strange setup here and I need to do some tweaking to get it solved.
I'm on a network where all DNS queries to Dynamic IPs (dyndns.com) are redirected to a "don't go there" IP.
So I tought about setting a static external DNS server IP in my resolv.conf using /etc/dhcp/dhclient.conf.
This works fine!
The only problem I have now, is that if I put the external DNS server first, I don't have any name resolution for the internal network, and if I put the internal DNS first, I don't have any name resolution for the dyndns domains...
How can I configure my linux to tell it to go to the internal DNS for .internal.org adresses, and to the external for everything else?
My first thought is "why are resolutions go dyndns.org being re-directed?" If that's just your ISP, then ensure you are not breaking some sort of acceptable use policy. However, if this is where you work, bypassing your IT department's policies could be bad for you.
Having said that, when I need a more complex dns solution such as your own, I build my own dns server locally. You can then change teh settings in resolv.conf to "nameserver 127.0.0.1". You can configure zones, so that queries to internal domains get re-directed to the internal dns servers, whereas all others can get routed to the internet dns server of your choice.
I will not try to tell you how to configure a dns server: that is WAY beyond this topic.
The only problem I have now, is that if I put the external DNS server first, I don't have any name resolution for the internal network, and if I put the internal DNS first, I don't have any name resolution for the dyndns domains...
How can I configure my linux to tell it to go to the internal DNS for .internal.org adresses, and to the external for everything else?
You can make the external DNS a cache. You can then tell the cache to direct queries for *.dyndns.com to a phony server, queries for *.yourcompany.com to the internal DNS, and all other queries to root nameservers. Dnscache from djbdns allows you to do this quite simply.
I was looking for some sort of "easy solution" to avoid having to play in my resolv.conf during the day. Setting up a local DNS server or starting to cache stuff is too complicated for the additional comfort it would bring... But anyway, thanks for your replies!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.