OpenDNS Servers

Discussion in 'Tomato Firmware' started by DeCex, Aug 5, 2008.

  1. DeCex

    DeCex LI Guru Member

    Ugh, i tried searching forum about info whare to add Open DNS Servers to Tomato. I cant find the infoes on it. Anyone have a clue?. Yes im on DHCP isp with given DNS servers already, but id like to add those 2 aswell together with the one given.


  2. jcrax

    jcrax Network Guru Member

    go to
    Basic -> Network -> Lan -> Static DNS
  3. TexasFlood

    TexasFlood Network Guru Member

    Adding them to static DNS will do what you want.

    A bit of extra info, which you didn't ask for really, but FYI, :biggrin:

    If you want to use only OpenDNS, unclick "Use Received DNS With Static DNS" under Advanced => DHCP / DNS. Then if you decide to set up an OpenDNS account to take advantage of features such as filtering, add it as a service with your account info under Basic -> DDNS.
  4. DeCex

    DeCex LI Guru Member

    Ahh.... a workaround found;

    Tomato only supplies 3 DNS servers to dnsmasq, via resolv.dnsmasq, so if you specify 3 static dns the "use supplied dns in addition to static" has no effect.

    I get 2 dns servers via dhcp, so can only add one additional opendns server via the web gui.

    The 3 servers limit is a Tomato restriction, not dnsmasq, so a workaround is to not enter your additional (open)dns servers in the static dns fields, but to add them to the web gui "Dnsmasq Custom Configuration" with

  5. TexasFlood

    TexasFlood Network Guru Member

    Yep, noticed that, so I just have the two static entries for OpenDNS and unticked "Use Received DNS With Static DNS" under Advanced => DHCP / DNS (actually don't have to do this, if this is ticked so Tomato only adds one of the ISP DNS servers in, the script will just add in the missing ones). I pick up my ISP provided DNS servers with the script below. I have it under the firewall tab but really not sure if it belongs there or WAN Up. It's working though. I use the DNSMasq "strict-order" option so it goes to OpenDNS if available and follows my filtering rules set up there. I just add the ISP DNS servers for redundancy. Your workaround looks fine but don't think it would work for me since I want to automatically pick up the ISP servers in case they change but have the OpenDNS servers first and used in strict order.

    cfg="/etc/resolv.dnsmasq"; svr=1
    while [ $svr -le 3 ]; do
    dns=`nvram get wan_get_dns | cut -d " " -f $svr`
    [ -n "$dns" ] && [ `grep -c $dns $cfg` -eq 0 ] && echo "nameserver" $dns>>$cfg
    svr=`expr $svr + 1`; done
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice