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

hosts file

Discussion in 'Tomato Firmware' started by choas, May 20, 2007.

  1. choas

    choas LI Guru Member

    I just bought the WRT54GL to replace a NAT box. The NAT box was noisy and 200 WATT.

    The best thing about the NAT box was that I could block out trojans, spyware, advertisements, etc. using the hosts file, found in /etc.

    Does Tomato has a hosts file, and can I access it via SSH or something?
    I really want to know this before replacing the original firmware.
  2. affer

    affer LI Guru Member

    You can do essentially the same thing with the access restrictions feature. Just blacklist the sites you don't want /trust.
    See this thread for an example of how this can be done in tomato.
  3. choas

    choas LI Guru Member

    Some people in that thread seem to point out to the hosts file too.

    The access restriction looks nice, but I'd still like to know if it's possible in Tomato to SSH to the hosts file and edit it.

    So if anyone has figured that out, I'd much appreciate to hear from you!
  4. Odin-60

    Odin-60 LI Guru Member

    As far as I understand, the dnsmasq daemon in Tomato evaluates
    the file /etc/dmhosts, rather than /etc/hosts as usual. Thus, you
    may try the following:

    echo "x.x.x.x name" >> /etc/dmhosts

    You will need to restart dnsmasq afterwards to make it read the
    changed file. (No guarantee; I did not try it out.)

    Alternatively, use the "address" option of dnsmasq. For instance,
    enter records such as


    into the dnsmasq custom configuration field. (See the dnsmasq

Share This Page