Search the web
Sign In
New User? Sign Up
dnrd · DNRD discussion list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
dnrd and pppd   Message List  
Reply | Forward Message #164 of 261 |
Hi all,

Recently, I have installed dnrd to avoid problems with changing DNS
servers when using several providers. I have found that dnrd was not
properly integrated with pppd I had (both from Debian Potato, thus:
dnrd v. 2.6-1, pppd v. 2.3.11-1.4). The problem was that the script
/etc/ppp/ip-up.d/0dnrd did not use DNS1 and DNS2 set by pppd when
usepeerdns option was used and also /etc/ppp/resolv files were not used
when usepeerdns option was not on.

So I wrote a new /etc/ppp/ip-up.d/0dnrd and I want to share it with you.
Before I decided to submit it, I checked for a new version of dnrd -
maybe it is already improved. Indeed, there was a new version, 2.7-1,
which was "aware" of pppd's usepeerdns. But the usage of static DNS
adresses for various providers is still not there. Therefore I send
you my version of /etc/ppp/ip-up.d/0dnrd which covers both ways of DNS
assignment. Additionally, I have removed one bug in the original file:
the quotes around DNS variables in for loop are removed. With the quotes,
dnrd is started as dnrd -s -s -s -s if DNS variables are not defined.

Pawel Konieczny



#!/bin/sh

# Exit if package was removed but not purged.
test -x /usr/sbin/dnrd || exit 0

case "$PPP_IFACE" in
ippp0) #dnrd -s 123.45.67.89
;;
ppp*)
DNS=

# use ppp/resolv
if [ -f /etc/ppp/resolv/$PPP_IPPARAM ]; then
DNS="$DNS$(cat /etc/ppp/resolv/$PPP_IPPARAM |
awk '$1 == "nameserver" { printf " -s %s", $2 }')"
fi

# Since version 2.3.7 of the ppp daemon, the option
# "usepeerdns" sets environment variables $DNS1 and $DNS2.

for ns in $DNS1 $DNS2 $MS_DNS1 $MS_DNS2 ; do
DNS="$DNS -s $ns"
done

# Uncomment the following lines if you want to use automatically
# assigned DNS servers.

if [ -n "$DNS" ]; then
dnrd $DNS
fi
;;
esac



Tue Nov 7, 2000 9:23 pm

Pawel.Konieczny@...
Send Email Send Email

Forward
Message #164 of 261 |
Expand Messages Author Sort by Date

Hi all, Recently, I have installed dnrd to avoid problems with changing DNS servers when using several providers. I have found that dnrd was not properly...
Pawel Konieczny
Pawel.Konieczny@...
Send Email
Nov 7, 2000
9:24 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help