On Thu, Nov 09, 2000 at 02:30:02PM -0500, Derek Martin <[EMAIL PROTECTED]> wrote:
> Nonsense. If you have your own DNS server, it can do Internet queries
> when your link comes up. If the link goes down, you still need it to do
> local queries (the scenario here is most likely the DNS server is running
> on the machine that brings up the link). There SHOULD be a way to prevent
> the overwrite.
This is the situation I have at home. I have my dedicated Linux box
serve DNS. When I connect over ppp, it could be to at least two
different networks, with different DNS servers. I modified the ip-up
scripts in /etc/ppp to update named.conf to put the DNS servers in the
forwarders section on named.conf and restart named.
Attached is the ip-up.local file I am using.
--
Bob Bell <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
"Felten, who examined the secret "source code" for Windows 98 under
a court order, said he had found 3,000 bugs marked by Microsoft
programmers in the portion of Windows 98 he had examined -- and he
had looked at only one-seventh of it."
-- http://www.zdnet.com/zdnn/stories/news/0,4586,2273581,00.html
#!/bin/sh
if [ "$PEERDNS" != no -a -n "$DNS1" ] &&
tr=`mktemp /tmp/named.XXXXXX` ; then
current_replacement="$DNS1"
next_replacement="$DNS2"
forward_next="no"
(cat /etc/named.conf ; echo EOF ; echo EOF) | while read answer ; do
case "$answer" in
*"}"*)
forward_next=no
;;
esac
if [ "$forward_next" = yes ] && [ -n "$current_replacement" ] ; then
echo "$current_replacement" >> $tr
if [ -n "$next_replacement" ] ; then
current_replacement="$next_replacement"
next_replacement=
else
current_replacement=
fi
elif [ "$answer" != EOF ] ; then
echo "$answer" >> $tr
fi
case "$answer" in
*"forwarders {"*)
forward_next=yes
;;
esac
done
cat $tr > /etc/named.conf
rm -f $tr
/etc/rc.d/init.d/named restart
fi
exit 0