ppp and DNS problem in Linux - PPP

This is a discussion on ppp and DNS problem in Linux - PPP ; 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, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: ppp and DNS problem in Linux

  1. ppp and DNS problem in Linux

    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


  2. Re: ppp and DNS problem in Linux

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    olutchen@mail.ru wrote:
    > 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.

    > 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.

    > 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.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.7 (GNU/Linux)

    iD8DBQFDG2zHagVFX4UWr64RAlB+AKDyJjL/xgcRkY1fVh9sWBtpGfq+NgCfZ92e
    DU+tjDTh5bBGtIkkpA2mn6A=
    =Jwb0
    -----END PGP SIGNATURE-----

  3. Re: ppp and DNS problem in Linux

    olutchen@mail.ru writes:

    >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.


+ Reply to Thread