"Hermes" <(E-Mail Removed)> wrote:
>
>Indeed, /etc/resolv.conf is a symbolic link to /etc/ppp/resolv.conf,
>and I don't know how to avoid that if I want to use dynamic DNS.
>I'd have to be notified by pppd that it got the DNS IPs and stuff them
>in /etc/resolv.conf. Maybe I should poll the /etc/ppp/resolv.conf
>to see when pppd adds the DNS IPs or poll the DNS1 and DNS2
>environment variables to obtain those IPs?
If you are concerned that pppd may not be able to correctly
populate the /etc/ppp/resolv.conf file if the ISP doesn't supply
the information, there are other ways to accomplish that which
allow for error checking. Read the man page for pppd, and look
at the description of the /usepeerdns/ option. Note that in
addition to the /etc/ppp/resolv.conf file, the IP addresses of
the DNS servers are also used to call the /etc/ppp/ip-up script.
That script can verify that the DNS server addresses are
provided, and then modify, or not, the /etc/resolv.conf file.
Search on /ip-up/ in the pppd man page and you will find various
information.
>As it is a linux box, I have total control over all the scripts, no
>restriction so I'm open to any idea.
I'm not sure just where I stole this, but here is the very
minimal ip-up script that I use,
#!/bin/sh
#
# ip-up
#
# The keyword "usepeerdns" for pppd causes this script
# to be executed when a ppp connection is made. One or
# two DNS server IP addresses are provided in environment
# variables DNS1 and DNS2. Also /etc/ppp/resolv.conf
# is written with appropriate entries.
#
if [ -n "${DNS1}" -o -n "${DNS2}" ]
then
> /etc/resolv.conf
if [ -n "${DNS1}" ]
then
echo "nameserver ${DNS1}" >> /etc/resolv.conf
fi
if [ -n "${DNS2}" ]
then
echo "nameserver ${DNS2}" >> /etc/resolv.conf
fi
fi
Obviously you might want to add a few things, such as a default
name server from a different organization just in case the ISP
has a problem.
>From your suggestion, I see you line up with the others
>in opposing the use of dynamic DNS since it is <SARCASM> an
>infidel Micro$oft invention to make the user's life easier and any
>Micro$oft invention is evil, by definition </SARCASM>. However,
>imagine a nursing home caregiver trying to use this box having to
>figure out the DNS numbers to input on the screen.
Without any sarcasm at all, I'll grant that almost anything from
Microsoft is questionable. However, "dynamic DNS" is the only
reasonable way to configure a dialup pppd link *if* you are
going to use the ISP's DNS servers. The suggestion that "they
are almost never changed" is true, but merely points out that
therefore when they do change the confusion over what has gone
wrong is going to significant. (I've had that happen to me
*several* times, so I'm not convinced that it is actually that
rare anyway!)
The real problem, from my perspective, is that only 3 DNS
servers can be listed in /etc/resolv.conf, instead of the dozen
or so that I would like to put there!
>If the
>ISP provides dynamic DNS, I'd rather use it, regardless of
>ideology, wouldn't you? OTOH, if support for this feature in
>pppd is crippled, too bad.
It is hardly crippled. But I'm wondering why you haven't read
the man page for pppd rather that spending time posting
guesses... ;-)
>I'll have to force the user to enter the
>DNS server IP addresses and live with that, the product won't be
>as user friendly as it could. I hope you get my point. Of course if
>this were my own private system, I wouldn't have spent one minute
>of my time (any repliers' time) asking this in a newsgroup.
>
>Anyway, what is the logic in usepeerdns requiring an initial DNS to be
>present in resolv.conf, if the whole point is not needing a DNS
>beforehand?
>
>Thanks!
>-H
--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)
(E-Mail Removed)