afaik there is no need to put 127.0.0.1 into /tmp/resolv.conf to
make dnsmasq work correctly. it's all a matter of a properly
configured /etc/dnsmasq.conf.
the dnsmasq.conf that comes with the dnsmasq package is imho
not a really good source to start from so I will post my dnsmasq.conf.
it will hopefully help you in achieving your goal
btw. my lan and wlan are on two different subnets.
(lan: 10.10.1.0/24 | wlan: 10.10.2.0/24)
/etc/dnsmasq.conf
#
# DNS forwarder for external domains
#
resolv-file=/etc/resolv.conf # upstream name servers
no-poll # do not poll resolv-file
except-interface=vlan1 # do not answer on external i/f
domain-needed # don't forward plain names
bogus-priv # don't forward private addresse
bogus-nxdomain=64.94.110.11 # keep Verisign in control
filterwin2k # filter useless Windows DNS requests
#
# Local DNS name server
#
#no-hosts # do not read /etc/hosts
#addn-hosts=/etc/sysconfig/dnsmaqs/hosts # instead, read this file
expand-hosts # add the domain to /etc/hosts entries
domain=wurstnetz.de # domain name
local=/wurstnetz.de/ # answer these domains from /etc/hosts
#
# Automatically configure DHCP client network i/f (RFC 1533)
#
dhcp-option=1,255.255.255.0 # subnet mask
#dhcp-option=2,-28800 # UTC -8:00
dhcp-option=lan, 3,10.10.1.1 # default g/w for LAN client
dhcp-option=wifi,3,10.10.2.1 # default g/w for WiFi clients
#dhcp-option=vpn, 3,10.0.3.1 # default g/w for VPN clients
dhcp-option=lan, 6,10.10.1.1 # DNS server for LAN clients
dhcp-option=wifi,6,10.10.2.1 # DNS server for WiFi clients
#dhcp-option=vpn, 6,10.0.3.1 # DNS server for VPN clients
#dhcp-option=7,10.0.1.2 # SYSLOG server
#dhcp-option=40,vonk # NIS domain
#dhcp-option=41,10.0.1.2 # NIS domain server
#dhcp-option=42,10.0.1.1 # NTP server
#
# DHCP address range
#
dhcp-leasefile=/var/dhcp.leases
dhcp-range=lan,10.10.1.150,10.10.1.199,255.255.255.0,15m # DHCP addr range for LAN clients
dhcp-range=wifi,10.10.2.10,10.10.2.250,255.255.255.0,15m # DHCP addr range for WIFI clients
#
# MAC addresses below are statically mapped to IP addresses
#
#LAN
dhcp-host=00:10:DC:31:6B:2A,net:lan, thefront.wurstnetz.de,10.10.1.27,12h
dhcp-host=00:00:39:FB:4A:EE,net:lan, fronti.lan.wurstnetz.de,10.10.1.127,12h
dhcp-host=00:50:BA:BA:9E:E0,net:lan, was.wurstnetz.de,10.10.1.129,12h
dhcp-host=00:E0:06:02:FB:8F,net:lan, hjs.wurstnetz.de,10.10.1.130,12h
#WLAN
dhcp-host=00:20:A6:4D:0E:07,net:wifi, fronti.wlan.wurstnetz.de,10.10.2.127,12h
dhcp-lease-max=50
/etc/hosts
#LAN
10.10.1.1 router.lan.wurstnetz.de www wurstnetz.de
10.10.1.27 thefront
10.10.1.127 fronti.lan.wurstnetz.de
10.10.1.129 was
10.10.1.130 hjs
10.10.1.200 pappschachtel
#WLAN
10.10.2.1 router.wlan.wurstnetz.de
10.10.2.127 fronti.wlan.wurstnetz.de
this way static hostnames set in /etc/hosts and windows/linux Hostnames set on the particular machine will resolve to
some_hostname.wurstnetz.de with some ip address dynamically assigned by dnsmasq
with some_hostname being the hostname assinged to the machine.
(Last edited by thefRont on 8 May 2005, 16:39)