wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,170
- Reaction score
- 5,199
When your Internet connection croaks, Asterisk extensions on a LAN also die if you happen to have one or more SIP or IAX trunks specified with FQDNs for the providers.
Here's how to install a caching DNS server on your PIAF system and avoid the problem.
NOTE: I'm doing this from memory because of lost data from The Great Crash. So, by all means, chime in if I've missed something.
You now should find an additional entry at the top of /etc/resolv.conf for 127.0.0.1. If not, add it and protect it from modifications with chattr +i /etc/resolv.conf:
If you dig pbxinaflash.com a couple of times, you will notice a marked improvement in DNS response times on the second try. This confirms that your caching server is working.
IMPORTANT: Do NOT restart your server during an Internet outage, or you will wipe out your DNS cache! Be sure to set the primary DNS entry on each of your phones to the IP address of your PIAF server. It's also a good idea to ping each of your providers or restart Asterisk to make certain their entries are in the cache before the Internet dies.
Here's how to install a caching DNS server on your PIAF system and avoid the problem.
NOTE: I'm doing this from memory because of lost data from The Great Crash. So, by all means, chime in if I've missed something.
Code:
yum -y install caching-nameserver bind-utils
chkconfig --level 345 named on
echo " " >> /etc/dhcp/dhclient-eth0.conf
echo "prepend domain-name-servers 127.0.0.1;" >> /etc/dhcp/dhclient-eth0.conf
service named restart
rndc-confgen -a -r /dev/urandom
service network restart
You now should find an additional entry at the top of /etc/resolv.conf for 127.0.0.1. If not, add it and protect it from modifications with chattr +i /etc/resolv.conf:
Code:
; generated by /sbin/dhclient-script
nameserver 127.0.0.1
nameserver 192.168.0.1
If you dig pbxinaflash.com a couple of times, you will notice a marked improvement in DNS response times on the second try. This confirms that your caching server is working.
IMPORTANT: Do NOT restart your server during an Internet outage, or you will wipe out your DNS cache! Be sure to set the primary DNS entry on each of your phones to the IP address of your PIAF server. It's also a good idea to ping each of your providers or restart Asterisk to make certain their entries are in the cache before the Internet dies.
Last edited: