[asterisk-users] DNS Query Overload

Philipp Kempgen philipp.kempgen at amooma.de
Sun Sep 21 09:05:22 CDT 2008


Adam Lovegrove schrieb:

> I've tried altering my /etc/hosts files as per the suggestion, but my DNS
> server is still being sent an A query - for every call.

Install a caching nameserver on the Asterisk server.


Debian
===================================================================

aptitude install bind9

Add the local nameserver at the beginning of /etc/resolv.conf:
nameserver 127.0.0.1           <- new entry
nameserver 192.168.1.1         <- whatever was already there

Add
include "/etc/bind/zones.rfc1918";
to /etc/bind/named.conf.local

/etc/init.d/bind9 restart
update-rc.d bind9 defaults



CentOS
===================================================================

yum install bind* caching-nameserver

Add the local nameserver at the beginning of /etc/resolv.conf:
nameserver 127.0.0.1           <- new entry
nameserver 192.168.1.1         <- whatever was already there

/etc/init.d/named restart
chkconfig --levels 235 named on



Test it
===================================================================

$ nslookup www.google.com
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
www.google.de   canonical name = www.google.com.
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 209.85.135.104
Name:   www.l.google.com
Address: 209.85.135.147
Name:   www.l.google.com
Address: 209.85.135.99
Name:   www.l.google.com
Address: 209.85.135.103

Repeat that command. On the second invocation the response should
come from the local nameserver (127.0.0.1).



   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 



More information about the asterisk-users mailing list