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.
I was wondering if it is possible for me to run my own DNS server even though I have a dynamic IP. I heard if you keep the TTL's low, it shouldn't be a problem. Would this actually work and be useful, could be done, but not practical, or simply no chance in hell?
Do you mean that your server you wanna run the DNS on has a dynamic IP?
Well, you can surely do that but what for?
DNS clients have the DNS server's IP address hard-coded in their IP config. Or if they use DHCP, it is hard coded in the DHCP server. So if your DNS server has a dynamic IP, well, when its IP will change, clients won't be able to resolve no more as they'll keep trying to connect to your old DNS server's IP, unless you manually change the IP config of all the client or of the DHCP server...
Now if this is about learning stuff about DNS, why not?
it could be acheived by building a script that would check it eth0 Ip's have change. If so, it would change the "router" entry in your host.conf file then do a route del default , route add default gw router eth0. Then restart dhcpd. named should not notice it as the dns servers have not changed, just your IP. But just in case, restart it too it only takes a few secs. I'm not sure enough about this to let you restart only the dhcp server. Personally I would restart every server that do something out of my external IP (I'm paranoid).
If you want to make a DNS server for just computers sitting on your local network, that works great no matter what your Internet IP Address does.
If you want to make a DNS server so computers out on The Internet can use you as their DNS server or as the nameserver for a domain you own that isn't really a good idea with a dynamic IP. The fact that your IP could change means there will be some time between when it changes and your TTL where systems on The Internet can not see you. Using a lower TTL will just put more load on the computer listing your DNS entry and that computer is usually not under your control so you can't likely change it's value anyhow.
The idea of DNS is that there will be known good IP addresses that have servers to resolve names, this whole concept is violated when you try to put one of these servers on an IP address that could change. If it's just for your local network, that is fine because then the system will have it's dynamic Internet IP and an IP address on your internal network that likely does not change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.