Re: ppp.conf + resolv.conf

2007-05-08 Thread Tom Evans
On Sun, 2007-05-06 at 18:32 +0100, Matthew Seaman wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> JD Bronson wrote:
> > I am using 6.2 as a DSL (PPPoE) router and also run my own internal DNS
> > on the same machine. I would like to APPEND my ISP's dished out DNS
> > servers to my current resolv.conf but anytime I enable dns in my
> > ppp.conf it nukes my entire resolv.conf!
> > 
> > I am looking to end up with this:
> > 
> > % cat /etc/resolv.conf
> > domain mydomain
> > nameserver 192.168.1.1
> > nameserver ISP's DNS
> > nameserver ISP's DNS
> > 
> > 
> > How do I do this and still retain my own entries in resolv.conf?
> > If I was using DHCPclient, I could edit dhclient.conf of course but
> > PPPoE does not consult this file during negotiation that I am aware of.
> > 
> > Any comments will be appreciated...
> 
> As you say, PPP doesn't let you append extra servers to what it receives
> automatically.  Your best recourse then is to find out the IP numbers
> of your ISPs DNS machines -- either by consulting the ISP's documentation
> or web site, by asking their support team or by looking at the results
> obtained by running PPP with 'enable dns'.
> 
> Then make sure your ppp.conf does not overwrite your /etc/resolv.conf on
> connection, and just edit resolv.conf to insert the IP numbers you've
> discovered.  A static resolv.conf will serve you well enough. After all,
> it's not like your ISP will be changing their DNS servers every few hours.
> 
>   Cheers,
> 
>   Matthew
> 
> - -- 
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>   Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
>   Kent, CT11 9PW
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.3 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGPhE08Mjk52CukIwRCHDoAJ93yd9gz56ky1YZHKTfHo6FZINmcQCeMsqI
> 6tA7krSkXceKhswQO/As+eo=
> =ITCJ
> -END PGP SIGNATURE-
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Not actually tested this, ip-up might be a little early for this

$ cat > /etc/ppp/ppp-linkup
#!/bin/sh
(
/bin/echo -e "domain foo\nnameserver 192.168.1.1\n"; 
/usr/bin/grep nameserver /etc/resolv.conf
) > /tmp/resolv.conf
/bin/mv /tmp/resolv.conf /etc/resolv.conf
^D
$ chmod +x /etc/ppp/ppp.linkup

Or add "resolv readonly" to your ppp.conf, and maintain your resolv.conf
yourself.


signature.asc
Description: This is a digitally signed message part


Re: ppp.conf + resolv.conf

2007-05-06 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

JD Bronson wrote:
> I am using 6.2 as a DSL (PPPoE) router and also run my own internal DNS
> on the same machine. I would like to APPEND my ISP's dished out DNS
> servers to my current resolv.conf but anytime I enable dns in my
> ppp.conf it nukes my entire resolv.conf!
> 
> I am looking to end up with this:
> 
> % cat /etc/resolv.conf
> domain mydomain
> nameserver 192.168.1.1
> nameserver ISP's DNS
> nameserver ISP's DNS
> 
> 
> How do I do this and still retain my own entries in resolv.conf?
> If I was using DHCPclient, I could edit dhclient.conf of course but
> PPPoE does not consult this file during negotiation that I am aware of.
> 
> Any comments will be appreciated...

As you say, PPP doesn't let you append extra servers to what it receives
automatically.  Your best recourse then is to find out the IP numbers
of your ISPs DNS machines -- either by consulting the ISP's documentation
or web site, by asking their support team or by looking at the results
obtained by running PPP with 'enable dns'.

Then make sure your ppp.conf does not overwrite your /etc/resolv.conf on
connection, and just edit resolv.conf to insert the IP numbers you've
discovered.  A static resolv.conf will serve you well enough. After all,
it's not like your ISP will be changing their DNS servers every few hours.

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGPhE08Mjk52CukIwRCHDoAJ93yd9gz56ky1YZHKTfHo6FZINmcQCeMsqI
6tA7krSkXceKhswQO/As+eo=
=ITCJ
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: ppp.conf + resolv.conf

2007-05-06 Thread JD Bronson

At 01:12 PM 5/6/2007 -0400, Bob wrote:

Be sure you have this statement in your ppp.conf

enable dns

# Gets the ISP's DNS IP address & places them
# in resolv.conf for reference by FBSD.


But this overwrites my resolv.conf doesnt it?
thats what I am trying to avoid

-JD 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: ppp.conf + resolv.conf

2007-05-06 Thread Bob
Be sure you have this statement in your ppp.conf

enable dns

# Gets the ISP's DNS IP address & places them
# in resolv.conf for reference by FBSD.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of JD Bronson
Sent: Sunday, May 06, 2007 11:40 AM
To: freebsd-questions@freebsd.org
Subject: ppp.conf + resolv.conf

I am using 6.2 as a DSL (PPPoE) router and also run my own internal DNS
on the same machine. I would like to APPEND my ISP's dished out DNS
servers to my current resolv.conf but anytime I enable dns in my
ppp.conf it nukes my entire resolv.conf!

I am looking to end up with this:

% cat /etc/resolv.conf
domain mydomain
nameserver 192.168.1.1
nameserver ISP's DNS
nameserver ISP's DNS


How do I do this and still retain my own entries in resolv.conf?
If I was using DHCPclient, I could edit dhclient.conf of course but
PPPoE does not consult this file during negotiation that I am aware of.

Any comments will be appreciated...

-JD


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


ppp.conf + resolv.conf

2007-05-06 Thread JD Bronson

I am using 6.2 as a DSL (PPPoE) router and also run my own internal DNS
on the same machine. I would like to APPEND my ISP's dished out DNS 
servers to my current resolv.conf but anytime I enable dns in my 
ppp.conf it nukes my entire resolv.conf!


I am looking to end up with this:

% cat /etc/resolv.conf
domain mydomain
nameserver 192.168.1.1
nameserver ISP's DNS
nameserver ISP's DNS


How do I do this and still retain my own entries in resolv.conf?
If I was using DHCPclient, I could edit dhclient.conf of course but 
PPPoE does not consult this file during negotiation that I am aware of.


Any comments will be appreciated...

-JD


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"