[Dnsmasq-discuss] general question
Staenker
staenker at web.de
Fri Jul 22 14:28:46 BST 2005
[...]
> Hi, I've got a couple of little suspects. From the snippet above I
> understand that your pings don't work from the machine running dnsmasq, so
> my question is: did you specify address 127.0.0.1 as a nameserver (possibly
> the preferred one) for that machine in /etc/resolv.conf? this is most
> likely the configuration you are missing.
I did 5 minutes ago. It doas not work. Also it doas not work on another
machine thats only nameserver is dnsmasq.
>
> If that file is ok then the next question is: is your /etc/nsswitch.conf
> properly configured? specifically it should have a line like the following:
>
> hosts: files dns
>
> or eventually like the following:
>
> hosts: dns files
>
> or anyway a "hosts:" line with the "dns" service specified somewhere in the
> line (if it's the first service specified or the last one or is in the
> middle of other services in that same line doesn't really matter right
> now). The concept is: if /etc/nsswitch.conf has the entry named "hosts:"
> WITHOUT the word "dns" listed therein then that machine will never query
> dnsmasq.
Ok, to tell the truth i didn't hear about this file before. But it
contains the line hosts: . Here the listing:
mrsec:/home/staenker# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
One last thing i forgot: Thanks a lot for your help!
Any other ideas, why it don't works?
PS:
To short up a bit, here my /etc/dnsmasq.conf:
mrsec:/home/staenker# cat /etc/dnsmasq.conf.short
# Never forward plain names (with a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/localnet/
# Add domains which you want to force to an IP address here.
# The example below send any host in doubleclick.net to a local
# webserver.
address=/www.steganos.com/127.0.0.1
address=/steganos.com/127.0.0.1
# If you want dnsmasq to listen for requests only on specified interfaces
# (and the loopback) give the name of the interface (eg eth0) here.
# Repeat the line for more than one interface.
interface=eth0
interface=eth2
# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
expand-hosts
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 1) Allows DHCP hosts to have fully qualified domain names, as long
# as the domain part matches this setting.
# 2) Sets the "domain" DHCP option thereby potentially setting the
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
domain=lan
# This is an example of a DHCP range where the netmask is given. This
# is needed for networks we reach the dnsmasq DHCP server via a relay
# agent. If you don't know what a DHCP relay agent is, you probably
# don't need to worry about this.
dhcp-range=lan,192.168.0.2,192.168.0.10,255.255.255.0,1h
dhcp-range=wlan,192.168.1.2,192.168.1.10,255.255.255.0,1h
# Always give the host with ethernet address 11:22:33:44:55:66
# the name fred and IP address 192.168.0.60 and lease time 45 minutes
dhcp-host=00:0e:35:05:f4:67,mrlapwl,192.168.1.2
dhcp-host=00:40:05:54:16:83,mrschnegge,192.168.1.3
dhcp-host=00:0E:0C:5E:8F:5D,mraps,192.168.0.2
dhcp-host=00:0E:0C:5E:8F:80,mrbig,192.168.0.3
dhcp-host=00:02:3f:14:4e:6b,mrlapl,192.168.0.4
dhcp-host=08:00:06:25:7E:08,debian,192.168.0.5
# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
dhcp-option=42,time.nist.gov
# If you want to disable negative caching, uncomment this.
no-negcache
# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
log-queries
More information about the Dnsmasq-discuss
mailing list