Re: [Debian] Debian 2.2r4 + T-DSL
* Andreas Behnert <abehn@gmx.net> [011130 01:11]:
> Eckhard Hoeffner wrote:
> >
> >
> > 1.
> > Was ohne probleme funktioniert ist folgendes (ging aber schon
> > öfters durch die Liste):
> > Am Server, der die Verbindung zum Internet herstellt, wird dnrd
> > installiert. In der /etc/init.d/dnrd trägst du dann folgendes ein
> > (u.a.)
> >
> > ------------------------------------------------------------
> > # diverse nameserver
> > DNS1=194.25.0.68 # telekom
> > DNS2=194.25.0.52
>
> Vorsicht - die DNS-Einträge werden ja erst durch den pppd geholt.
> T-Online hat AFAIK noch nie die Adressen ändert, aber möglich
> wäre es ja. Man könnte also mal in die /etc/ppp/ip-up.d/0dns-up
> schauen, wie die dort die Adressen rausholen, diese dann dynamisch
> in die /etc/init.d/dnrd eintragen und ein "/etc/init.d/dnrd restart",
> man kann also gleich die /etc/ppp/ip-up.d/0dns-up umbauen. Das ist
> zugegebenermaßen aufwendig, aber machbar und der DSL-Rechner mit
> dnrd würde mit jedem Provider funktionieren, egal welche DNS-Einträge
> der beim connect liefert. :-)
> Obwohl - soviele DSL-Provider gibt's ja auch wieder nicht...
Bei dnrd ist ja ein Script dabei, habs hier mal angehängt. Das wird nach
/etc/ppp/ip-up.d kopiert. Bei jeder Einwahl werden die DNS Server
dann aktuallisiert.
cu
Bruno
#!/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
;;
*)
DNS=
# Since version 2.3.7 of the ppp daemon, the option
# "usepeerdns" sets environment variables $DNS1 and $DNS2.
for ns in "$DNS1" "$DNS2" ; do
# "$MS_DNS1" "$MS_DNS2" ; do
DNS="$DNS -s $ns"
done
# Uncomment the following lines if you want to use automatically
# assigned DNS servers.
# Note: You have to run the ppp/ippp daemon with the option
# "usepeerdns" or "ms-get-dns" respectively in order to use this
# feature.
if [ -n "$DNS" ]; then
dnrd -k
dnrd -l $DNS
fi
# echo "dnrd $DNS --- $DNS1" > ~/test.dns
;;
esac
Reply to: