LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I auto-update client DNS Addresses with DHCPd (https://www.linuxquestions.org/questions/linux-networking-3/how-do-i-auto-update-client-dns-addresses-with-dhcpd-554948/)

Centinul 05-18-2007 11:52 AM

How do I auto-update client DNS Addresses with DHCPd
 
I have the following configuration:
Code:

==INTERNET==Firewall==Private LAN
The internet facing NIC gets its IP address dynamically.

I would like to configure my firewall to be a DHCP server and serve all the IPs for my Private LAN.

In the dhcpd.conf configuration you can only pass static DNS server names to the clients.

Is there anyway that dhcpd could dynamically assign the DNS servers I'm getting from the internet NIC to the clients on the Private LAN?

Would it be easier to setup an internal DNS Server?

Thanks.

macemoneta 05-18-2007 12:02 PM

You want to do this in your local DNS server rather than DHCPD. The reason is that DHCPD will not update until the lease is renewed (could be days). Using a local DNS server, your clients just point to your DNS, and it forwards to the correct servers.

I use a script to get the DNS information from the firewall router via wget and update my local DNS server via sed. I use both a triggered execution (when the router reports to my syslog that it has received an IP address update), and periodically (in case the update is missed). There are multiple scripts, and they are specific to the set of software and hardware that I use; you will not find a generic implementation.

Conceptually, it's very straightforward though so you can create your own scripts or have someone create them for you and the software / hardware combination you are using.

Centinul 05-18-2007 12:34 PM

I really appreciate your response. I figured I should setup a local DNS server.

Are there any good tutorials out there that will allow me to easily set this configuration up, including setting up the forwarding of DNS as well as any IPTables rules necessary?

Thanks.

macemoneta 05-18-2007 01:07 PM

There's a lot of online documentation for BIND. Basically, you will be setting up a forwarding/caching nameserver (so you are looking at configuration of the "forwarders" option). There's a good tutorial here.


All times are GMT -5. The time now is 06:27 PM.