1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Handout different DNS server(s) via DHCP

Discussion in 'Tomato Firmware' started by scottws, Nov 4, 2008.

  1. scottws

    scottws Guest

    I have two internal DNS servers in my domain. I can set the DNS servers statically on my Windows clients while still receiving the IPs via DHCP easily, but this is not easily accomplished on my Linux clients.

    What I would really like to do is have the DHCP server (on the router running Tomato) hand out my two internal DNS servers as primary and secondary and then use the router itself as tertiary. I have looked high and low and have not found a way to enable this.

    Yes, I'm aware that you can set the Static DNS in the Basic section, and I have those set to OpenDNS servers. I would like to keep these settings as they are and have the clients look at the local DNS servers first and forward on if they don't have records on them.
     
  2. HennieM

    HennieM Network Guru Member

    Search for threads about dnsmasq, and/or study the man page at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html and then manually mod your DNSmasq config.

    Alternatively, if you want to, on your Linux clients, you can just write a tiny script called by your rc.local (or better, to be called by your dhcp client's post-up script) that does this
    Code:
    /bin/echo -e "\nnameserver [IP of nameserver1]\nnameserver [IP of nameserver 2]" >> /etc/resolv.conf
    The \n's in the line means to enter a newline, so you would end up with your resolv.conf looking something like this

    search scottws.com
    nameserver 192.168.1.1
    nameserver 192.168.1.2
    nameserver 192.168.1.3
     
  3. Runnerboy967

    Runnerboy967 Networkin' Nut Member

    I'm having the same issues. Any solutions? I'm a first year college student so I'm not really understanding that manual, but also hope to get a DNS server to be sent out through DHCP
     

Share This Page