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

v1.9 DNSmasq question

Discussion in 'Tomato Firmware' started by Sorthum, Jul 7, 2008.

  1. Sorthum

    Sorthum Addicted to LI Member

    Howdy. I'm running Tomato 1.9 on a Linksys WRT54G v3.

    I'm attempting to redirect DNS on the LAN to use the private IP for a host, as opposed to having to go "out the front door" to hit internal machines.

    Initially, I added the proper line to /etc/hosts.dnsmasq, but it disappeared on reboot. The solution I came up with (and it may be heinously incorrect, if so tell me, please!) was to assign static DHCP leases to the proper MAC addresses (even though the machines in question have the IP hardcoded in).

    # cat /etc/dnsmasq.conf
    interface=br0
    resolv-file=/etc/resolv.dnsmasq
    addn-hosts=/etc/hosts.dnsmasq
    expand-hosts
    dhcp-range=192.168.1.100,192.168.1.149,255.255.255.0,1440m
    dhcp-option=3,192.168.1.1
    dhcp-authoritative
    dhcp-host=01:02:03:04:**:**,24.199.11.2
    dhcp-host=00:1C:B3:C1:**:**,192.168.1.2,1440m
    dhcp-host=00:06:5B:DD:**:**,192.168.1.15,1440m
    dhcp-host=00:1D:60:92:**:**,192.168.1.20,1440m

    # cat /etc/hosts.dnsmasq
    192.168.1.1 unknown
    192.168.1.2 singularity.mydomain.com
    192.168.1.15 alcatraz.mydomain.com
    192.168.1.20 tempest.mydomain.com

    The issue occurs when I ssh into a box from 192.168.1.2, it shows the connection as coming from the tomato box itself:

    singularity:$ ssh jay@alcatraz.mydomain.com
    [jay@alcatraz ~]$ w
    10:48PM up 1 day, 22:49, 1 user, load averages: 0.66, 0.26, 0.14
    USER TTY FROM LOGIN@ IDLE WHAT
    jay p0 192.168.1.1 10:48PM - w
    [jay@alcatraz ~]$


    Any idea why it's doing this? DNS resolvs properly to the internal IP for this host.

    Thanks in advance; let me know if I can provide any further information.
     
  2. mstombs

    mstombs Network Guru Member

    Do you mean v1.19? There are lots of options for dnsmasq that can be added via the GUI, and the hosts file is also used.

    Are you using vlans?

    A local connection shouldn't go via the Tomato, should just be handled by the switch, the wrong source IP suggests it is being routed by the WAN IP nat loopback function.
     

Share This Page