[Dnsmasq-discuss] dnmasq slow for local network

Kiswono Prayogo kiswono at gmail.com
Wed Nov 4 04:47:34 GMT 2009

Hi, i use dnsmasq for resolving my local network address,
here's my /etc/hosts file (real ip and domain name changed to fake):
## cat /etc/hosts genesis       localhost dns00.mysecretdomain.ac.id           dns00 dns.mysecretdomain.ac.id             dns mail.mysecretdomain.ac.id           proxy
. . .
#20 more server hosts
. . .
#and 15000 more advertisement-blocking hosts that redirected ti

# cat /etc/dnsmasq.conf | egrep -a -v '^[[:space:]]*#' $1 | egrep -a

## cat /etc/resolv.conf | egrep -a -v '^[[:space:]]*#' $1 | egrep -a
search mysecretdomain.ac.id
nameserver # opendns
nameserver # opendns
nameserver # dns4
nameserver # dns3
nameserver # dns2

all my client dns request was redirected to
## cat /etc/network/if-up.d/custom
#some iptables clearing rules
. . .
real1 =
reals =
wifis =
staff =
iptables -A PREROUTING -t nat -p TCP -s $wifis -d ! $reals --dport 53 -j
DNAT --to $real1:53
iptables -A PREROUTING -t nat -p UDP -s $wifis -d ! $reals --dport 53 -j
DNAT --to $real1:53
iptables -A PREROUTING -t nat -p TCP -s $staff -d ! $reals --dport 53 -j
DNAT --to $real1:53
iptables -A PREROUTING -t nat -p UDP -s $staff -d ! $reals --dport 53 -j
DNAT --to $real1:53
. . .
#some default rules

and the interface of the gateway server are: eth0 =, eth1 =
all clients dns configuration was set to
and if i open for example dns00.mysecretdomain.ac.id, it always lag for 3-25
seconds (and showing "Resolving host..." on Chromium or "Looking
up dns00.mysecretdomain.ac.id...") before it show the web.. and it does not
happened for non local web..
i wonder where is the lag problem source?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20091104/3718f9dd/attachment.htm 

More information about the Dnsmasq-discuss mailing list