Easy way to add hosts to DNS?

Discussion in 'Tomato Firmware' started by scottlindner, Aug 14, 2010.

  1. scottlindner

    scottlindner Addicted to LI Member

    I don't know how to properly ask this question so please correct me on my terminology. I am a QWest DSL subscriber and until recently I had been using my DSL modem (it's actually a router) in transparent bridging mode so that NAT loopback would work for my domains that are locally hosted. I have had to turn that off because I have been having regular DSL troubles and need the additional log information on the DSL router. The trouble is, the DSL router doesn't support NAT loopback. Rather than manually editing the hosts file on each machine in my LAN I would prefer to add the host names with LAN IP addresses to the DNS on my Tomato router. Is this possible? If so, how?

    Is there an alternate solution that you can think of? I was thinking of trying to link the hosts file in my machines to a single hosts file on the network but that seems a bit hokey.

  2. ntest7

    ntest7 Network Guru Member

    You can put your hosts file in the tomato Adminstration-Scripts-Init page like so:

    echo '
    {contents of hosts file
    ' >> /etc/hosts
    /usr/bin/killall -HUP dnsmasq
  3. scottlindner

    scottlindner Addicted to LI Member

    No way. That's too easy. Thanks!
  4. srouquette

    srouquette Network Guru Member

    Or in "Advanced -> DHCP / DNS -> Dnsmasq Custom Config", you can add for example:


    Or this may also work:


    (with a space between them)
  5. rhester72

    rhester72 Network Guru Member

    It's actually a lot easier to use the GUI and add them to Static DHCP without MAC addresses, which is how Tomato is intended to handle this. ;)

  6. scottlindner

    scottlindner Addicted to LI Member

    That doesn't work. I'm talking about Internet DNS names, not LAN host names. Sure, I can use the LAN hostnames from any machine via DNS like you say, but I have one host that serves six different Internet host names via HTTP v1.1 virtual hosts. Tomato will not allow me to assign multiple IP/Hostname/MACs that share the same IP or MAC.
  7. rhester72

    rhester72 Network Guru Member

    Ahhhhh...yes, sorry, I misread. dnsmasq substitution is definitely the way to go there.

  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