0

The Ubuntu 10.04 server has eth0 Internet interface configured by means of an ISP's DHCP. At the same time the server has static eth0 LAN interface to which it provides masquerading (NAT) and LAN-internal DHCP service (dhcp3-server).

As far as I've understood the manual, I had to hardcode DNS servers to advertise through LAN DHCP with option domain-name-servers in dhcpd.conf.

But what if the ISP changes his DNS server IP silently (we use a SOHO-class ISP, so this won't surprise me much)? Can I configure dhcpd to advertise the DNS server the server uses itself, the one gotten by its DHCP client mechanism?

2
  • Why not skip the ISP DNS servers since they are garbage part of the time. Maybe use the Google or OpenDNS servers?
    – Zoredache
    Dec 21, 2010 at 19:31
  • @zoredache - I use Google servers as secondary and tertiary DNS servers in my config. I think (haven't checked, actually) using ISP's DNS servers is meant to be faster and more the "right way" (as using a server in my city instead of using overseas Google's servers every time).
    – Ivan
    Dec 22, 2010 at 1:57

1 Answer 1

0

No, you can't configure ISC's dhcpd to advertise the DNS server the server uses itself. What is typically done in these SOHO setups is that a lightweight caching nameserver such as dnsmasq is installed on the dhcp server (in your case the Ubuntu 10.04 server) and you set option domain-name-servers to the internal (LAN) IP address of the server.

However, name server IP addresses don't change that often so you may choose to not worry about it. An ISP should send you email weeks ahead of time telling you the IP addresses of their DNS servers are changing.

(Note that if your ISP changed DNS IP addresses your Ubuntu 10.04 server would no longer be able to resolve names until it sends another dhcp request out (I'm not even sure if a renewal request can contain new DNS information).)

3
  • A decent ISP would send notices ahead of itme, yes.
    – Joris
    Dec 21, 2010 at 18:56
  • "An ISP should send you email weeks ahead of time telling you the IP addresses of their DNS servers are changing" - I am pretty sure they won't, as they rely on DHCP for clients configuration and never mention manual configuration or anything related. I've only figured out our current DNS server from looking what was got from ISP's DHCP.
    – Ivan
    Dec 22, 2010 at 1:52
  • "Note that if your ISP..." - thanks, a useful note.
    – Ivan
    Dec 22, 2010 at 1:53

You must log in to answer this question.

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