Discussion:
ppp and DNS problem in Linux
(too old to reply)
o***@mail.ru
2005-09-04 08:39:47 UTC
Permalink
I have a problem with DNS when I connect to my ISP when connecting from
Linux. I use pppd to dialup my ISP. Why I must specify ISP DNS in
resolv.conf? Is it possible to avoid it? By the way, when I connect
from WinXP (from the same mashine), I have no problems with DNS. Why?

Thank you
Lew Pitcher
2005-09-04 21:53:11 UTC
Permalink
Post by o***@mail.ru
I have a problem with DNS when I connect to my ISP when connecting from
Linux. I use pppd to dialup my ISP. Why I must specify ISP DNS in
resolv.conf?
Who says that you /must/ specify your ISP's DNS? Certainly, you /don't/ have
to specify your ISP's DNS in resolv.conf.
Post by o***@mail.ru
Is it possible to avoid it?
Certainly. I know of at least two different ways, and I'm sure that there are
more.

You probably want the simplest way, which is to set "usepeerdns" in your ppp
options file. "usepeerdns" will
"Ask the peer for up to 2 DNS server addresses. The
addresses supplied by the peer (if any) are passed
to the /etc/ppp/ip-up script in the environment
variables DNS1 and DNS2, and the environment variĀ­
able USEPEERDNS will be set to 1. In addition,
pppd will create an /etc/ppp/resolv.conf file conĀ­
taining one or two nameserver lines with the
address(es) supplied by the peer."

Your /etc/ppp/ip-up script would be responsible for overriding your standard
/etc/resolv.conf file with the contents of /etc/ppp/resolv.conf, which
contains the DNS assignments PPP retrieved from your ISP

/etc/ppp/ip-down would be responsible for reversing this, and restoring your
original /etc/resolv.conf when the PPP link with your ISP is terminated.


The other way to handle DNS is to run a caching DNS server, and forget about
your ISP's DNS servers entirely.
Post by o***@mail.ru
By the way, when I connect
from WinXP (from the same mashine), I have no problems with DNS. Why?
Because MSWindows makes certain assumptions about what you want to do (and
gives you no choice in the matter). One of those assumptions is that you will
/always/ want to use the peerdns provided by the PPP connection.


- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
Unruh
2005-09-06 12:24:20 UTC
Permalink
Post by o***@mail.ru
I have a problem with DNS when I connect to my ISP when connecting from
Linux. I use pppd to dialup my ISP. Why I must specify ISP DNS in
resolv.conf? Is it possible to avoid it? By the way, when I connect
from WinXP (from the same mashine), I have no problems with DNS. Why?
Because pppd does not automatically replace the dns even if the Microsoft
addition to ppp is used (usepeerdns option in /etc/ppp/options)
The dns addresses are placed into /etc/ppp/resolv.conf
It is up to you, or more usually a line in /etc/ppp/ip-up to insert the
addresses into /etc/resolv.conf
IF ppp is the only way you ever contact the net and have no other dns
servers you want to use, you could make a link from /etc/resolv.conf to
/etc/ppp/resolv.conf as well.

Loading...