Re: How to force a static /etc/resolv.conf?

2013-06-13 Thread Darren Pilgrim

On 2013-06-12 17:46, Darren Pilgrim wrote:

How do I tell resolvconf to always use a static configuration or, better
yet, to not muck with /etc/resolv.conf at all?


According to the project developer, the answer is to have resolvconf not 
touch /etc/resolv.conf by put the following in /etc/resolvconf.conf


resolv_conf="/dev/null"

Then you just edit /etc/resolv.conf directly.

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


Re: How to force a static /etc/resolv.conf?

2013-06-13 Thread Darren Pilgrim

On 2013-06-13 05:02, Loic Capdeville wrote:

You can configure it in your dhclient.conf file.
Use the supersede keyword.
For example, in your case add:

supersede domain-search "example.com example.net"
supersede domain-name-servers 2001:db8::53


That only addresses the DHCPv4 client.  The DHCPv6 client doesn't have 
those options and neither do the VPN clients.


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


Re: How to force a static /etc/resolv.conf?

2013-06-13 Thread Loic Capdeville

On 13/06/2013 02:46, Darren Pilgrim wrote:

I'm running 9.1.  I run a local recursive resolver, so my
/etc/resolv.conf needs to remain static.  I have DHCPv4, DHCPv6 and VPN
clients running which all want to modify /etc/resolv.conf.  I have set
in /etc/resolvconf.conf:

search_domains="example.com. example.net."
name_servers="2001:db8::53"

But that only prepends that information.  Search domains and nameservers
from other sources still get included.  I can set /etc/resolv.conf as
immutable, but's a hack and it generates errors from resolveconf.

How do I tell resolvconf to always use a static configuration or, better
yet, to not muck with /etc/resolv.conf at all?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"freebsd-questions-unsubscr...@freebsd.org"


Hi,

You can configure it in your dhclient.conf file.
Use the supersede keyword.
For example, in your case add:

supersede domain-search "example.com example.net"
supersede domain-name-servers 2001:db8::53

to your /etc/dhclient.conf

Loic
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


How to force a static /etc/resolv.conf?

2013-06-12 Thread Darren Pilgrim
I'm running 9.1.  I run a local recursive resolver, so my 
/etc/resolv.conf needs to remain static.  I have DHCPv4, DHCPv6 and VPN 
clients running which all want to modify /etc/resolv.conf.  I have set 
in /etc/resolvconf.conf:


search_domains="example.com. example.net."
name_servers="2001:db8::53"

But that only prepends that information.  Search domains and nameservers 
from other sources still get included.  I can set /etc/resolv.conf as 
immutable, but's a hack and it generates errors from resolveconf.


How do I tell resolvconf to always use a static configuration or, better 
yet, to not muck with /etc/resolv.conf at all?

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


resolvconf overwriting /etc/resolv.conf

2012-12-18 Thread Ruben de Groot

Hi,

I run bind on a LAN, with some LAN-only (sub)domains. On the LAN is also
a DSL modem/router that advertises ipv6 addresses. So far so good.
However, since I upgraded the server from 8-STABLE to 9.1-PRERELEASE,
the /etc/resolv.conf gets overwritten by the resolvconf script, with an
ipv6 nameserver (presumably the router, haven't checked). This is not 
what I want.

Now I see that you can prepend nameservers through /etc/resolvconf.conf,
but what I really want is for resolvconf to leave my /etc/resolv.conf
alone. Is there any way to disable the script (apart from deleting it)?

thanks,
Ruben

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


Re: sendmail && resolv.conf changes

2010-09-14 Thread Matthias Apitz
El día Tuesday, September 14, 2010 a las 05:49:07PM +0200, Terrence Koeman 
escribió:

> > > What I wanted to say: sendmail runs and DHCP changes in certain
> > > situations the IP, routing and DNS, and sendmail does not adopt on
> > these
> > > changes.
> >
> >
> It might be an idea to (mis)use the "script" option in dhclient.conf to 
> restart sendmail (/etc/rc.d/sendmail restart) after a lease has been aquired. 
> See 'man dhclient.conf'.

Actually I'm using hooks in devd(8) like:

$ cat /usr/local/etc/devd/tun6.conf
notify 0 {
match "system"  "IFNET";
match "subsystem"   "tun6";
match "type""LINK_UP";
action "/usr/local/etc/devd/tun6.sh $subsystem $type";
};

$ cat /usr/local/etc/devd/tun6.sh
#!/bin/sh
#
echo `date`: $0 $* >> /tmp/devd.out

(
  sleep 30 ;
  echo Doing: /etc/rc.d/sendmail onerestart >> /tmp/devd.out ;
  /etc/rc.d/sendmail onerestart ;
)

exit 0

for each interface which might come up; but I was thinking that
there must be a more general solution in sendmail or DNS itself;

in any case, thanks for your idea;

> ... 
> Please quote all replies in correspondence.

No. See netiquette RFC: http://www.faqs.org/rfcs/rfc1855.html

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.unixarea.de/
Solidarity with the zionistic pirates of Israel?   Not in my  name!
¿Solidaridad con los piratas sionistas de Israel? ¡No en mi nombre!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: sendmail && resolv.conf changes

2010-09-14 Thread Terrence Koeman
> -Original Message-
> From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
> questi...@freebsd.org] On Behalf Of tomasz dereszynski
> Sent: Tuesday, September 14, 2010 11:28 AM
> To: Matthias Apitz; freebsd-questions@freebsd.org
> Subject: Re: sendmail && resolv.conf changes
>
>
> > El día Tuesday, September 14, 2010 a las 09:15:49AM +0100, tomasz
> > dereszynski escribió:
> >
> >>
> >> >
> >> > Hello,
> >> >
> >> > When using a laptop it is normal that there are some changes in
> >> > resolv.conf during the live, for example:
> >> >
> >> > boot time: no network available
> >> > start of PPP over UMTS: resolv.conf from provider
> >> > start VPN to connect to company: resolv.conf from company
> >> > ...
> >> >
> >> > it seems that sendmail is not aware of such changes in the
> resolv.conf
> >> > and always get stuck with the old DNS and ofc does not work on
> >> incoming
> >> > mails (provided by fetchmail). A restart helps, but is there some
> >> better
> >> > way to let sendmail switch to the new DNS environment when
> resolv.conf
> >> > changes?
> >> >
> >> > Thanks
> >> >
> >> My very wide guess would be that Sendmail starts before system
> obtain
> >> network settings from DHCP.
> >
> > Your guess is correct :-)
> >
> > What I wanted to say: sendmail runs and DHCP changes in certain
> > situations the IP, routing and DNS, and sendmail does not adopt on
> these
> > changes.
>
>
> delay Sendmail start to after network settings loaded from DHCP.
>
> not sure if there is any 'documentation correct' way of doing that but
> 'home crafted' one would be to move /etc/rc.sendmail to
> /usr/local/etc/rc.d/blah.sendmail.sh and remove it from rc.config
>
> hope someone here knows more proper way and can advise.
>

It might be an idea to (mis)use the "script" option in dhclient.conf to restart 
sendmail (/etc/rc.d/sendmail restart) after a lease has been aquired. See 'man 
dhclient.conf'.

--
Regards,
T. Koeman, MTh/BSc/BPsy; Technical Monk

MediaMonks B.V. (www.mediamonks.com)
Please quote all replies in correspondence.



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


Re: sendmail && resolv.conf changes

2010-09-14 Thread tomasz dereszynski

> El día Tuesday, September 14, 2010 a las 09:15:49AM +0100, tomasz
> dereszynski escribió:
>
>>
>> >
>> > Hello,
>> >
>> > When using a laptop it is normal that there are some changes in
>> > resolv.conf during the live, for example:
>> >
>> > boot time: no network available
>> > start of PPP over UMTS: resolv.conf from provider
>> > start VPN to connect to company: resolv.conf from company
>> > ...
>> >
>> > it seems that sendmail is not aware of such changes in the resolv.conf
>> > and always get stuck with the old DNS and ofc does not work on
>> incoming
>> > mails (provided by fetchmail). A restart helps, but is there some
>> better
>> > way to let sendmail switch to the new DNS environment when resolv.conf
>> > changes?
>> >
>> > Thanks
>> >
>> My very wide guess would be that Sendmail starts before system obtain
>> network settings from DHCP.
>
> Your guess is correct :-)
>
> What I wanted to say: sendmail runs and DHCP changes in certain
> situations the IP, routing and DNS, and sendmail does not adopt on these
> changes.


delay Sendmail start to after network settings loaded from DHCP.

not sure if there is any 'documentation correct' way of doing that but
'home crafted' one would be to move /etc/rc.sendmail to
/usr/local/etc/rc.d/blah.sendmail.sh and remove it from rc.config

hope someone here knows more proper way and can advise.

-- 
bEsT rEgArDs|   "Confidence is what you have before you
tomasz dereszynski  |   understand the problem." -- Woody Allen
|
Spes confisa Deo|   "In theory, theory and practice are much
numquam confusa recedit |   the same. In practice they are very
|   different." -- Albert Einstein


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


Re: sendmail && resolv.conf changes

2010-09-14 Thread Matthias Apitz
El día Tuesday, September 14, 2010 a las 09:15:49AM +0100, tomasz dereszynski 
escribió:

> 
> >
> > Hello,
> >
> > When using a laptop it is normal that there are some changes in
> > resolv.conf during the live, for example:
> >
> > boot time: no network available
> > start of PPP over UMTS: resolv.conf from provider
> > start VPN to connect to company: resolv.conf from company
> > ...
> >
> > it seems that sendmail is not aware of such changes in the resolv.conf
> > and always get stuck with the old DNS and ofc does not work on incoming
> > mails (provided by fetchmail). A restart helps, but is there some better
> > way to let sendmail switch to the new DNS environment when resolv.conf
> > changes?
> >
> > Thanks
> >
> My very wide guess would be that Sendmail starts before system obtain
> network settings from DHCP.

Your guess is correct :-)

What I wanted to say: sendmail runs and DHCP changes in certain
situations the IP, routing and DNS, and sendmail does not adopt on these
changes.

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.unixarea.de/
Solidarity with the zionistic pirates of Israel?   Not in my  name!
¿Solidaridad con los piratas sionistas de Israel? ¡No en mi nombre!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: sendmail && resolv.conf changes

2010-09-14 Thread tomasz dereszynski

>
> Hello,
>
> When using a laptop it is normal that there are some changes in
> resolv.conf during the live, for example:
>
> boot time: no network available
> start of PPP over UMTS: resolv.conf from provider
> start VPN to connect to company: resolv.conf from company
> ...
>
> it seems that sendmail is not aware of such changes in the resolv.conf
> and always get stuck with the old DNS and ofc does not work on incoming
> mails (provided by fetchmail). A restart helps, but is there some better
> way to let sendmail switch to the new DNS environment when resolv.conf
> changes?
>
> Thanks
>
My very wide guess would be that Sendmail starts before system obtain
network settings from DHCP.

But I do not remember Sendmail settings well enough.

-- 
bEsT rEgArDs|   "Confidence is what you have before you
tomasz dereszynski  |   understand the problem." -- Woody Allen
|
Spes confisa Deo|   "In theory, theory and practice are much
numquam confusa recedit |   the same. In practice they are very
|   different." -- Albert Einstein


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


sendmail && resolv.conf changes

2010-09-14 Thread Matthias Apitz

Hello,

When using a laptop it is normal that there are some changes in
resolv.conf during the live, for example:

boot time: no network available
start of PPP over UMTS: resolv.conf from provider
start VPN to connect to company: resolv.conf from company
...

it seems that sendmail is not aware of such changes in the resolv.conf
and always get stuck with the old DNS and ofc does not work on incoming
mails (provided by fetchmail). A restart helps, but is there some better
way to let sendmail switch to the new DNS environment when resolv.conf
changes?

Thanks

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.unixarea.de/
Solidarity with the zionistic pirates of Israel?   Not in my  name!
¿Solidaridad con los piratas sionistas de Israel? ¡No en mi nombre!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


sendmail && /etc/resolv.conf modified by DHCP

2010-04-09 Thread Matthias Apitz

Hello,

At home I have my WLAN as 192.168.2.0/24. After moving to my office and
rebooting there, I encounter that sendmail receives messages (via
fetchmail) terrible slow. I digged into this and see that the sendmail
issues wrong DNS requests as (for example):

08:51:18.753491 IP xx.xx.xx.xx.49812 > 192.168.2.1.53: 12793+ MX?  
ubuntu.com.Sisis.de. (37)
08:51:18.867365 IP xx.xx.xx.xx.42619 > 192.168.2.1.53: 12793+ MX?  
physik.uni-wuerzburg.de.Sisis.de. (50)
08:51:18.982491 IP xx.xx.xx.xx.52554 > 192.168.2.1.53: 12794+ ?  
lexasoft.ru. (29)
08:51:19.095490 IP xx.xx.xx.xx.10093 > 192.168.2.1.53: 12794+ ?  des.no. 
(24)

The reason is obvious: 
- the /etc/resolv.conf on shutdown at home has this DNS resolver;
- in my office the system comes up and when at some point the WLAN
  interface associates, it gets an IP and a new /etc/resolv.conf file;

Why sendmail does not honour the new /etc/resolv.conf and stays with the
old DNS server IP? How this is supposed to fix? An idea would be to
restart sendmail via a devd hook, but maybe there is some config values
for sendmail that it always check /etc/resolv.conf for fresh?

Thx

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.unixarea.de/
¡Ya basta! ¡Tropas de OTAN, fuera de Afghanistan!
There's an end of it! NATO troups out of Afghanistan!
Schluss jetzt endlich! NATO raus aus Afghanistan!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


ip refresh, resolv.conf and local scripts on startup?

2007-05-09 Thread Richard Simmonds

> (rc.firewall uses this to get network info:
> onet=`ifconfig xl0 | grep "inet " | awk '{print $6}'`
> oip=`ifconfig xl0 | grep "inet " | awk '{print $2}'` Meaning, 
> rc.firewall would also have to be re-ran if the IP is new).
> [also to make things more complicated, I think I need a rule in 
> rc.firewallto allow for DHCP clients to go out?  It gets blocked on 
> external interface when firewall comes up??]

Looks like you're using ipfw, in which case this works for me:
# /etc/rc.d/ipfw restart

> Also how do I override /etc/resolv.conf?  DHCP client configures it I 
> think and sets it up to point to my ISP DNS servers (which suck) and 
> would like to give it mine instead of there, but it keeps getting over 
> written on startup when it gets a DHCP lease?

In dhclient.conf, add your own DNS servers, plus your ISP's as backup:

Interface "xl0" {
prepend domain-name-servers xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy;
request subnet-mask, broadcast-address, routers, domain-name-servers;
}


Get new ip:
# dhclient xl0


Hope this helps

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


Re: ip refresh, resolv.conf and local scripts on startup?

2007-05-09 Thread RW
On Tue, 8 May 2007 16:11:21 -0500
"Jack Barnett" <[EMAIL PROTECTED]> wrote:

> I have a script that updates some dynamic DNS records (can be run as
> non-root if needed).
> 
> It needs to be run on startup - after network is configured and after
> rc.firewall (it'll get blocked if it's run before the firewall is
> setup).
> 
> What is a good place to put this?  I could put it at the end of
> rc.firewall, but is there a better place to put it?

This is a problem that people see when they need to update a local
dhcp server on a machine that gets its own settings by dhcp. Try google.


> Also how do I refresh a dynamic IP without rebooting?
> 
> Sometimes my cable modem gets messed up and under windows I just do:
> ipconfig /release
> ipconfig /renew
> 
> and it gets new IP and sets everything up.  In FreeBSD is there a way
> to reconfigure everything without rebooting?

/etc/rc.d/dhclient restart

should do it

> (rc.firewall uses this to get network info:
> onet=`ifconfig xl0 | grep "inet " | awk '{print $6}'`
> oip=`ifconfig xl0 | grep "inet " | awk '{print $2}'`
> Meaning, rc.firewall would also have to be re-ran if the IP is new).
> [also to make things more complicated, I think I need a rule in
> rc.firewallto allow for DHCP clients to go out?  It gets blocked on
> external interface
> when firewall comes up??]

I doesn't appear to matter, I think dhclient bypasses the firewall. at
least that's my experience with PF.

> Also how do I override /etc/resolv.conf?  DHCP client configures it I
> think and sets it up to point to my ISP DNS servers (which suck) and
> would like to give it mine instead of there, but it keeps getting
> over written on startup when it gets a DHCP lease?

See dhclient.conf(5) for how to control what DHCP does to resolv.conf,

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


Re: ip refresh, resolv.conf and local scripts on startup?

2007-05-09 Thread Jack Barnett

hrm, thanks, but this doesn't seem to work:

`ifconfig xl0 down` doesn't do anything... executes without error, but the
interface stays up.

`/sbin/dhclient`  gets a new IP, but doesn't "re-do" the firewall with new
IP, so everything is broken.

 echo nameserver 123.34.45.67  > /etc/resolv.conf
 echo  nameserver 321.23.67.328 >> /etc/resolv.conf

This is over written on startup/reboot by the dhcpclient.  If I modify the
file, then it tries to "correct" it self and over writes the file with the
DNS servers provided via the DHCP server.

Any other ideas?

Thanks,
Jack




On 5/8/07, User Iam <[EMAIL PROTECTED]> wrote:


Hi

To get a new ip

Do

/sbin/ifconfig  ethX  down

/sbin/dhclient   # to get a new ip..


Then for resolv.conf


echo nameserver 123.34.45.67  > /etc/resolv.conf
echo  nameserver 321.23.67.328 >> /etc/resolv.conf


HTH

User Iam


On 5/8/07, Jack Barnett <[EMAIL PROTECTED]> wrote:
>
> I have a script that updates some dynamic DNS records (can be run as
> non-root if needed).
>
> It needs to be run on startup - after network is configured and after
> rc.firewall (it'll get blocked if it's run before the firewall is
> setup).
>
> What is a good place to put this?  I could put it at the end of
> rc.firewall,
> but is there a better place to put it?
>
> Also how do I refresh a dynamic IP without rebooting?
>
> Sometimes my cable modem gets messed up and under windows I just do:
> ipconfig /release
> ipconfig /renew
>
> and it gets new IP and sets everything up.  In FreeBSD is there a way to
> reconfigure everything without rebooting?
>
> (rc.firewall uses this to get network info:
> onet=`ifconfig xl0 | grep "inet " | awk '{print $6}'`
> oip=`ifconfig xl0 | grep "inet " | awk '{print $2}'`
> Meaning, rc.firewall would also have to be re-ran if the IP is new).
> [also to make things more complicated, I think I need a rule in
> rc.firewallto allow for DHCP clients to go out?  It gets blocked on
> external interface
> when firewall comes up??]
>
> Also how do I override /etc/resolv.conf?  DHCP client configures it I
> think
> and sets it up to point to my ISP DNS servers (which suck) and would
> like to
> give it mine instead of there, but it keeps getting over written on
> startup
> when it gets a DHCP lease?
>
> thanks.
> ___
> 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]"


ip refresh, resolv.conf and local scripts on startup?

2007-05-08 Thread Jack Barnett

I have a script that updates some dynamic DNS records (can be run as
non-root if needed).

It needs to be run on startup - after network is configured and after
rc.firewall (it'll get blocked if it's run before the firewall is setup).

What is a good place to put this?  I could put it at the end of rc.firewall,
but is there a better place to put it?

Also how do I refresh a dynamic IP without rebooting?

Sometimes my cable modem gets messed up and under windows I just do:
ipconfig /release
ipconfig /renew

and it gets new IP and sets everything up.  In FreeBSD is there a way to
reconfigure everything without rebooting?

(rc.firewall uses this to get network info:
   onet=`ifconfig xl0 | grep "inet " | awk '{print $6}'`
   oip=`ifconfig xl0 | grep "inet " | awk '{print $2}'`
Meaning, rc.firewall would also have to be re-ran if the IP is new).
[also to make things more complicated, I think I need a rule in
rc.firewallto allow for DHCP clients to go out?  It gets blocked on
external interface
when firewall comes up??]

Also how do I override /etc/resolv.conf?  DHCP client configures it I think
and sets it up to point to my ISP DNS servers (which suck) and would like to
give it mine instead of there, but it keeps getting over written on startup
when it gets a DHCP lease?

thanks.
___
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-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]"


Re: PPP and resolv.conf

2007-04-18 Thread Lowell Gilbert
"Richard Simmonds" <[EMAIL PROTECTED]> writes:

>  
>
> -Original Message-
> From: RW [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 18, 2007 1:11 AM
> To: freebsd-questions@freebsd.org
> Cc: [EMAIL PROTECTED]
> Subject: Re: PPP and resolv.conf
>
> On Tue, 17 Apr 2007 14:48:25 +0800
> "Richard Simmonds" <[EMAIL PROTECTED]> wrote:
>
>>  
>> >How can I stop ppp from modifying my /etc/resolv.conf?
>> >Everytime I establish a pppoe session, my resolv.conf file gets
>> reconfigured to my ISPs DNS Servers.
>> 
>> It's dhclient, not ppp that's modding the file.
>
>>This is unlikely. PPP normally provides the dns server addresses itself, in
> which case the suggestion to remove "enable dns" from ppp.conf is correct.
>
> Well, as always, YMMV. 
>
> If the connection is providing a dynamic address via dhcp, as my ADSL
> provider is, it appears to be dhclient that's updating resolv.conf so the
> setup as stated works for me. I have 'enable dns' in my ppp.conf file as
> well but my provider doesn't seem to be able to offer a dns server address
> correctly, which is why I run one locally on the network. I suspect it is
> probably a setup error on my part but I have neither the time or the
> inclination to tinker with it any more than I have to.

If DHCP is setting it, then use the "prepend" or "supersede" keywords
on "domain-name-servers" in your dhclient.conf(5).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: PPP and resolv.conf

2007-04-18 Thread Richard Simmonds
 

-Original Message-
From: RW [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 1:11 AM
To: freebsd-questions@freebsd.org
Cc: [EMAIL PROTECTED]
Subject: Re: PPP and resolv.conf

On Tue, 17 Apr 2007 14:48:25 +0800
"Richard Simmonds" <[EMAIL PROTECTED]> wrote:

>  
> >How can I stop ppp from modifying my /etc/resolv.conf?
> >Everytime I establish a pppoe session, my resolv.conf file gets
> reconfigured to my ISPs DNS Servers.
> 
> It's dhclient, not ppp that's modding the file.

>This is unlikely. PPP normally provides the dns server addresses itself, in
which case the suggestion to remove "enable dns" from ppp.conf is correct.

Well, as always, YMMV. 

If the connection is providing a dynamic address via dhcp, as my ADSL
provider is, it appears to be dhclient that's updating resolv.conf so the
setup as stated works for me. I have 'enable dns' in my ppp.conf file as
well but my provider doesn't seem to be able to offer a dns server address
correctly, which is why I run one locally on the network. I suspect it is
probably a setup error on my part but I have neither the time or the
inclination to tinker with it any more than I have to.

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


Re: PPP and resolv.conf

2007-04-17 Thread RW
On Tue, 17 Apr 2007 14:48:25 +0800
"Richard Simmonds" <[EMAIL PROTECTED]> wrote:

>  
> >How can I stop ppp from modifying my /etc/resolv.conf?
> >Everytime I establish a pppoe session, my resolv.conf file gets
> reconfigured to my ISPs DNS Servers.
> 
> It's dhclient, not ppp that's modding the file.

This is unlikely. PPP normally provides the dns server addresses
itself, in which case the suggestion to remove "enable dns" from
ppp.conf is correct.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


PPP and resolv.conf

2007-04-17 Thread Richard Simmonds
 
>How can I stop ppp from modifying my /etc/resolv.conf?
>Everytime I establish a pppoe session, my resolv.conf file gets
reconfigured to my ISPs DNS Servers.

It's dhclient, not ppp that's modding the file. Adding this to your
dhclient.conf file will fix the problem

interface dc0 {
prepend domain-name-servers 192.168.0.10;
request subnet-mask, broadcast-address, routers, domain-name-servers;
}

you will need to change the interface name and provide the actual dns server
address to match your configuration

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


Re: PPP and resolv.conf

2007-04-17 Thread Ivan Carey

Daniel Marsh wrote:

On 4/17/07, Ansar Mohammed <[EMAIL PROTECTED]> wrote:


How can I stop ppp from modifying my /etc/resolv.conf?
Everytime I establish a pppoe session, my resolv.conf file gets
reconfigured
to my ISPs DNS Servers.



You could make resolv.conf to what you want it to be and then do: chflags
schg /etc/resolv.conf

That will stop anything from modifying it, if you're in securelevel 1 or
more you can't take schg off, you need to reboot into securelevel 0.

Other than that, check the ppp man page for an option...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"


.

do you have enable dns in your ppp.conf file? I had the same thing and 
commented the enable dns to resolve


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


Re: PPP and resolv.conf

2007-04-16 Thread Daniel Marsh

On 4/17/07, Ansar Mohammed <[EMAIL PROTECTED]> wrote:


How can I stop ppp from modifying my /etc/resolv.conf?
Everytime I establish a pppoe session, my resolv.conf file gets
reconfigured
to my ISPs DNS Servers.



You could make resolv.conf to what you want it to be and then do: chflags
schg /etc/resolv.conf

That will stop anything from modifying it, if you're in securelevel 1 or
more you can't take schg off, you need to reboot into securelevel 0.

Other than that, check the ppp man page for an option...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


PPP and resolv.conf

2007-04-16 Thread Ansar Mohammed
How can I stop ppp from modifying my /etc/resolv.conf?
Everytime I establish a pppoe session, my resolv.conf file gets reconfigured
to my ISPs DNS Servers.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: dhclient.conf + resolv.conf

2007-03-03 Thread Jonathan Horne
On Friday 02 March 2007 15:16, J.D. Bronson wrote:
> I am trying to have dhclient setup my resolv.conf perfect.
> I am very close.
>
> I have this in dhclient.conf:
>
> -
> interface "bge1" {
>  supersede domain-name "wixb.com";
>  prepend domain-name-servers 192.l68.1.1;
>  request subnet-mask, broadcast-address, routers, domain-name-servers;
>   }
> -
> What this is giving me is this:
>
> search wixb.com
> nameserver 192.168.1.1
> nameserver 24.94.163.100
> nameserver 24.94.163.101
>
> What I would like to do is change the 'search' to 'domain' and cant
> figure out what I am missing?
>
> -JD

IMO, i think your setup is fine.  my opinion, is that 'search' is more useful 
than 'domain'.  they have the same basic functionality, until you need to 
search more than one domain by default.  but with just a single name, they 
seem to be functionally the same.

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


dhclient.conf + resolv.conf

2007-03-02 Thread J.D. Bronson

I am trying to have dhclient setup my resolv.conf perfect.
I am very close.

I have this in dhclient.conf:

-
interface "bge1" {
supersede domain-name "wixb.com";
prepend domain-name-servers 192.l68.1.1;
request subnet-mask, broadcast-address, routers, domain-name-servers;
 }
-
What this is giving me is this:

search wixb.com
nameserver 192.168.1.1
nameserver 24.94.163.100
nameserver 24.94.163.101

What I would like to do is change the 'search' to 'domain' and cant 
figure out what I am missing?


-JD

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


Re: Is a re-boot req'd after changing 'resolv.conf' ?

2007-01-25 Thread Ivan Voras
V.I.Victor wrote:
> I'm simply going to change 2 "nameserver" ip-addresses.
> 
> Most of what I've found re. 'resolv.conf' implies it can just be changed 
> on-the-fly.  However, other sources (mostly upgrading info) have a reboot 
> involved.
> 
> So -- re-boot or not? (Note: this is a static-ip box running v5.4.)

Some applications only read resolv.conf once and keep the information,
so you need to restart those. Most others deal with it in the standard
way so no reboot is needed. The OS itself (and its standard utilities)
don't need a reboot.




signature.asc
Description: OpenPGP digital signature


Re: Is a re-boot req'd after changing 'resolv.conf' ?

2007-01-25 Thread David Kelly
On Thu, Jan 25, 2007 at 12:15:47PM -0800, Chuck Swiger wrote:
> On Jan 25, 2007, at 11:53 AM, V.I.Victor wrote:
> >
> >So -- re-boot or not? (Note: this is a static-ip box running v5.4.)
> 
> There is no reason to reboot after changing /etc/resolv.conf.  Almost  
> everything will be using the standard resolver routines from libc and  
> will pick up the new nameservers just fine.

Dhcpclient rewrites /etc/resolv.conf every time it renews the DHCP
lease.

-- 
David Kelly N4HHE, [EMAIL PROTECTED]

Whom computers would destroy, they must first drive mad.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is a re-boot req'd after changing 'resolv.conf' ?

2007-01-25 Thread Grant


You shouldnt need to reboot after adding a nameserver.

I'm not sure if you need to if you change domain names in there.


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


Re: Is a re-boot req'd after changing 'resolv.conf' ?

2007-01-25 Thread Chuck Swiger

On Jan 25, 2007, at 11:53 AM, V.I.Victor wrote:

I'm simply going to change 2 "nameserver" ip-addresses.

Most of what I've found re. 'resolv.conf' implies it can just be  
changed on-the-fly.  However, other sources (mostly upgrading info)  
have a reboot involved.


So -- re-boot or not? (Note: this is a static-ip box running v5.4.)


There is no reason to reboot after changing /etc/resolv.conf.  Almost  
everything will be using the standard resolver routines from libc and  
will pick up the new nameservers just fine.


--
-Chuck

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


Is a re-boot req'd after changing 'resolv.conf' ?

2007-01-25 Thread V.I.Victor

I'm simply going to change 2 "nameserver" ip-addresses.

Most of what I've found re. 'resolv.conf' implies it can just be changed 
on-the-fly.  However, other sources (mostly upgrading info) have a reboot 
involved.

So -- re-boot or not? (Note: this is a static-ip box running v5.4.)

Thanks!



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


Re: How about a Start-Up Script that execute every 30 minutes for resolv.conf???

2007-01-16 Thread Garrett Cooper

On Jan 16, 2007, at 12:36 AM, [LoN]Kamikaze wrote:


linux quest wrote:
Since, I desperately needed to connect to the Internet at this  
point of
time, I create a file called resolv.conf in /root ... I am  
thinking how

can I create a script so that it can copy resolv.conf from /root to
/etc/resolv.conf every 30 minutes at start up - This is because I  
don't
wanna manually type in "cp /root/resolv.conf /etc/resolv.conf"  
every 30

minutes.


http://www.freebsd.org/cgi/query-pr.cgi?pr=106902

The suggested script allows you to set your nameservers in rc.conf.  
I seriously doubt you need to do that every 30 minutes. It should  
be enought to write it on startup, so give it a try.


Better idea would be a PR to the docs folks about highlighting the  
resolv.conf file section in the handbook: <http://www.freebsd.org/doc/ 
en_US.ISO8859-1/books/handbook/configtuning-configfiles.html>. I had  
to get the single file HTML and search it a bit before I found the  
reference shown above (even though I basically knew about it  
already). So if you skip over that section of the handbook you won't  
see the relevant note to read the manpage for dhclient(8) unless you  
ask someone or find another referring manpage.

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


Re: How about a Start-Up Script that execute every 30 minutes for resolv.conf???

2007-01-16 Thread [LoN]Kamikaze
linux quest wrote:
> Since, I desperately needed to connect to the Internet at this point of 
> time, I create a file called resolv.conf in /root ... I am thinking how 
> can I create a script so that it can copy resolv.conf from /root to 
> /etc/resolv.conf every 30 minutes at start up - This is because I don't 
> wanna manually type in "cp /root/resolv.conf /etc/resolv.conf" every 30 
> minutes.

http://www.freebsd.org/cgi/query-pr.cgi?pr=106902

The suggested script allows you to set your nameservers in rc.conf. I seriously 
doubt you need to do that every 30 minutes. It should be enought to write it on 
startup, so give it a try.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How about a Start-Up Script that execute every 30 minutes for resolv.conf???

2007-01-16 Thread Jay Chandler

George Vanev wrote:

If you really want to copy resolv.conf from /root to /etc every 30 min
you don't need a startup script. Just add the following line in
/etc/crontab:
*/30 *   *   *   *   rootcp /root/resolv.conf
/etc/resolv.conf

I don't know what exactly are you trying to do, but this is not
quite a good decision.


Agreed-- it's a bad idea.  However, if you still want to do it, throw a 
-f flag after the cp just to make sure it forcibly overwrites the 
resolv.conf.


--
Jay Chandler
Network Administrator, Chapman University
714.628.7249 / [EMAIL PROTECTED]
Today's Excuse: Atilla the Hub 


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


Re: How about a Start-Up Script that execute every 30 minutes for resolv.conf???

2007-01-15 Thread George Vanev

If you really want to copy resolv.conf from /root to /etc every 30 min
you don't need a startup script. Just add the following line in
/etc/crontab:
*/30 *   *   *   *   rootcp /root/resolv.conf
/etc/resolv.conf

I don't know what exactly are you trying to do, but this is not
quite a good decision.


On 1/16/07, linux quest <[EMAIL PROTECTED]> wrote:



Dear Jay & The FreeBSD Communities,

Thanks for putting your time and patience to help me out. Anyway, I
tried it out, both changing the rc.conf and the dhclient.conf (one at a
time). After that (for both of the ways), I did manage to stop the
resolv.conf from being overwritten after the PC reboot. However, when I
ping
192.168.52.1 or 192.168.52.2, the error msg says that there is no route
to both of the IP. Even after I add the default route by using command
line ... I am still unable to ping google.com.

Then, I undo everything by using VMWare... (including undo the DHCP
configuration in rc.conf) so that I am able to ping google.com again.

Since, I desperately needed to connect to the Internet at this point of
time, I create a file called resolv.conf in /root ... I am thinking how
can I create a script so that it can copy resolv.conf from /root to
/etc/resolv.conf every 30 minutes at start up - This is because I don't
wanna manually type in "cp /root/resolv.conf /etc/resolv.conf" every 30
minutes.

Hope somebody can share with me the simple coding. Thanks :)

Regards,
Linux Quest

Jay Chandler <[EMAIL PROTECTED]> wrote: Please don't top-post.

linux quest wrote:
> Dear Jay,
>
> Actually, I am running FreeBSD Unix on a VMWare machine (Host OS:
> Win2003, Guest OS: FreeBSD).
>
> Any ideas how I can disable / ignore the routing from the VMnet8?
> Below are the only VMWare NAT configuration that I have access to. No
> DHCP enable / disable option.
>
>
> Ethernet adapter VMware Network Adapter VMnet8:
>
>Connection-specific DNS Suffix  . :
>IP Address. . . . . . . . . . . . : 192.168.52.1
>Subnet Mask . . . . . . . . . . . : 255.255.255.0
>Default Gateway . . . . . . . . . : 192.168.52.2
>
>
> When I install FreeBSD, I remember I did select some option to enable
> DHCP. Perhaps, I should disable the DHCP service in FreeBSD(Guest OS)
> - if so, any idea how do I do it?
>
> Thanks :)
>
> Regards,
> Linux Quest
>
>
Simple enough, then.

Edit /etc/rc.conf, and remove the line relating to the dhcp client.
Then add:
defaultrouter="192.168.51.2"
hostname="boxname!"
ifconfig_em0="inet 192.168.52.WHATEVERYOUWANT  netmask 255.255.255.0"

--
Jay Chandler
Network Administrator, Chapman University
714.628.7249 / [EMAIL PROTECTED]
Today's Excuse: emissions from GSM-phones


-
Everyone is raving about the all-new Yahoo! Mail beta.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
[EMAIL PROTECTED]"





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


How about a Start-Up Script that execute every 30 minutes for resolv.conf???

2007-01-15 Thread linux quest

Dear Jay & The FreeBSD Communities,

Thanks for putting your time and patience to help me out. Anyway, I 
tried it out, both changing the rc.conf and the dhclient.conf (one at a 
time). After that (for both of the ways), I did manage to stop the 
resolv.conf from being overwritten after the PC reboot. However, when I ping 
192.168.52.1 or 192.168.52.2, the error msg says that there is no route 
to both of the IP. Even after I add the default route by using command 
line ... I am still unable to ping google.com.

Then, I undo everything by using VMWare... (including undo the DHCP 
configuration in rc.conf) so that I am able to ping google.com again. 

Since, I desperately needed to connect to the Internet at this point of 
time, I create a file called resolv.conf in /root ... I am thinking how 
can I create a script so that it can copy resolv.conf from /root to 
/etc/resolv.conf every 30 minutes at start up - This is because I don't 
wanna manually type in "cp /root/resolv.conf /etc/resolv.conf" every 30 
minutes.

Hope somebody can share with me the simple coding. Thanks :)

Regards,
Linux Quest

Jay Chandler <[EMAIL PROTECTED]> wrote: Please don't top-post.

linux quest wrote:
> Dear Jay,
>
> Actually, I am running FreeBSD Unix on a VMWare machine (Host OS: 
> Win2003, Guest OS: FreeBSD).
>
> Any ideas how I can disable / ignore the routing from the VMnet8? 
> Below are the only VMWare NAT configuration that I have access to. No 
> DHCP enable / disable option.
>
>
> Ethernet adapter VMware Network Adapter VMnet8:
>
>Connection-specific DNS Suffix  . :
>IP Address. . . . . . . . . . . . : 192.168.52.1
>Subnet Mask . . . . . . . . . . . : 255.255.255.0
>Default Gateway . . . . . . . . . : 192.168.52.2
>
>
> When I install FreeBSD, I remember I did select some option to enable 
> DHCP. Perhaps, I should disable the DHCP service in FreeBSD(Guest OS) 
> - if so, any idea how do I do it?
>
> Thanks :)
>
> Regards,
> Linux Quest
>
>
Simple enough, then. 

Edit /etc/rc.conf, and remove the line relating to the dhcp client.  
Then add:
defaultrouter="192.168.51.2"
hostname="boxname!"
ifconfig_em0="inet 192.168.52.WHATEVERYOUWANT  netmask 255.255.255.0"

-- 
Jay Chandler
Network Administrator, Chapman University
714.628.7249 / [EMAIL PROTECTED]
Today's Excuse: emissions from GSM-phones 

 
-
Everyone is raving about the all-new Yahoo! Mail beta.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread a
On Sun, Dec 17, 2006 at 06:42:46PM +0100, [LoN]Kamikaze wrote:
> [EMAIL PROTECTED] wrote:
> > The automatically installed /etc/resolv.conf
> > contains the next:
> > 
> > nameserver 82.207.67.2
> > nameserver 213.179.244.18
> > 
> > Today I discovered that this servers is not servers of FreeBSD.org 
> > or InterNIC, but of my ISP.
> > 
> > I wonder how the system found these IP addresses?
> 
> The entries are created by dhclient or whichever different program 
> establishes the connection, when it receives the necessary information (your 
> IP, gateway and the nameservers to use) from your ISP.

I do not use any special DHCP client, but I use mpd(8) to connect via ADSL.

I thought, mpd has created these entries.
But when I temporary moved resolv.conf and restarted the computer, no 
resolv.conf appeared.
So I steel don't know, who created resolv.conf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread a
On Sun, Dec 17, 2006 at 06:42:46PM +0100, [LoN]Kamikaze wrote:
> [EMAIL PROTECTED] wrote:
> > The automatically installed /etc/resolv.conf
> > contains the next:
> > 
> > nameserver 82.207.67.2
> > nameserver 213.179.244.18
> > 
> > Today I discovered that this servers is not servers of FreeBSD.org 
> > or InterNIC, but of my ISP.
> > 
> > I wonder how the system found these IP addresses?
> 
> The entries are created by dhclient or whichever different program 
> establishes the connection, when it receives the necessary information (your 
> IP, gateway and the nameservers to use) from your ISP.

I do not use any special DHCP client, but I use mpd(8) to connect via ADSL.

I thought, mpd has created these entries.
But when I temporary moved resolv.conf and restarted the computer, no 
resolv.conf appeared.
So I steel don't know, who created resolv.conf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread a
On Sun, Dec 17, 2006 at 06:42:46PM +0100, [LoN]Kamikaze wrote:
> [EMAIL PROTECTED] wrote:
> > The automatically installed /etc/resolv.conf
> > contains the next:
> > 
> > nameserver 82.207.67.2
> > nameserver 213.179.244.18
> > 
> > Today I discovered that this servers is not servers of FreeBSD.org 
> > or InterNIC, but of my ISP.
> > 
> > I wonder how the system found these IP addresses?
> 
> The entries are created by dhclient or whichever different program 
> establishes the connection, when it receives the necessary information (your 
> IP, gateway and the nameservers to use) from your ISP.

I do not use any special DHCP client, but I use mpd(8) to connect via ADSL.

I thought, mpd has created these entries.
But when I temporary moved resolv.conf and restarted the computer, no 
resolv.conf appeared.
So I steel don't know, who created resolv.conf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
> The automatically installed /etc/resolv.conf
> contains the next:
> 
> nameserver 82.207.67.2
> nameserver 213.179.244.18
> 
> Today I discovered that this servers is not servers of FreeBSD.org 
> or InterNIC, but of my ISP.
> 
> I wonder how the system found these IP addresses?
> 
> Are these entries created during installation?
> 
> Elisey Babenko

By default dhcpcd does this.
- -Garrett
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhZFTEnKyINQw/HARAuXQAKCONJaEPSalX0X/U9/4EZ05oq6hAACfU05j
j0F7JiZYCXBKijnRiY1Q9gU=
=FfRr
-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: How did the /etc/resolv.conf appear?

2006-12-17 Thread [LoN]Kamikaze
[EMAIL PROTECTED] wrote:
> The automatically installed /etc/resolv.conf
> contains the next:
> 
> nameserver 82.207.67.2
> nameserver 213.179.244.18
> 
> Today I discovered that this servers is not servers of FreeBSD.org 
> or InterNIC, but of my ISP.
> 
> I wonder how the system found these IP addresses?

The entries are created by dhclient or whichever different program establishes 
the connection, when it receives the necessary information (your IP, gateway 
and the nameservers to use) from your ISP.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How did the /etc/resolv.conf appear?

2006-12-17 Thread Robert Huff

[EMAIL PROTECTED] writes:

>  The automatically installed /etc/resolv.conf
>  contains the next:
>  
>  nameserver 82.207.67.2
>  nameserver 213.179.244.18
>  
>  Today I discovered that this servers is not servers of FreeBSD.org 
>  or InterNIC, but of my ISP.
>  
>  I wonder how the system found these IP addresses?
>  
>  Are these entries created during installation?

Are you running DHCP(-client)?  If so, consider the "prepend"
and "supercede" directives.


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


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread Javier Henderson


On Dec 17, 2006, at 12:17 PM, [EMAIL PROTECTED] wrote:


The automatically installed /etc/resolv.conf
contains the next:

nameserver 82.207.67.2
nameserver 213.179.244.18

Today I discovered that this servers is not servers of FreeBSD.org
or InterNIC, but of my ISP.

I wonder how the system found these IP addresses?

Are these entries created during installation?


You must be using DHCP to obtain an address for your network interface 
(s)...


-jav


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


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread Dan Nelson
In the last episode (Dec 17), [EMAIL PROTECTED] said:
> The automatically installed /etc/resolv.conf
> contains the next:
> 
> nameserver 82.207.67.2
> nameserver 213.179.244.18
> 
> Today I discovered that this servers is not servers of FreeBSD.org 
> or InterNIC, but of my ISP.
> 
> I wonder how the system found these IP addresses?
> 
> Are these entries created during installation?

They could have been, if you selected DHCP configuration.  In addition
to your IP address, the server can also hand out DNS server addresses,
which dhcpd will use to create a resolv.conf file.

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


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread Peter Matulis

--- [EMAIL PROTECTED] wrote:

> The automatically installed /etc/resolv.conf
> contains the next:
> 
> nameserver 82.207.67.2
> nameserver 213.179.244.18
> 
> Today I discovered that this servers is not servers of FreeBSD.org 
> or InterNIC, but of my ISP.
> 
> I wonder how the system found these IP addresses?
> 
> Are these entries created during installation?

They were probably put there by your internet access mechanism (PPP /
PPPOE).

Peter

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How did the /etc/resolv.conf appear?

2006-12-17 Thread Eric

[EMAIL PROTECTED] wrote:

The automatically installed /etc/resolv.conf
contains the next:

nameserver 82.207.67.2
nameserver 213.179.244.18

Today I discovered that this servers is not servers of FreeBSD.org 
or InterNIC, but of my ISP.


I wonder how the system found these IP addresses?

Are these entries created during installation?

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

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


How did the /etc/resolv.conf appear?

2006-12-17 Thread a
The automatically installed /etc/resolv.conf
contains the next:

nameserver 82.207.67.2
nameserver 213.179.244.18

Today I discovered that this servers is not servers of FreeBSD.org 
or InterNIC, but of my ISP.

I wonder how the system found these IP addresses?

Are these entries created during installation?

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


resolv.conf and IPv6 and DHCP for IPv6

2006-12-05 Thread Andrew Falanga

Is there anything different with entries in resolv.conf for IPv6 addresses?
I'm looking at the manual page for resolv.conf and didn't find anything
specific to IPv6.  Therefore, I'm assuming that the entry would simply be:

nameserver fec0::3

vs.

nameserver 192.168.0.1

Or whatever.  Is this correct?



Secondly, does there exist any documentation for configuring the dhcpd
program from ports?

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


Re: dhcp resolv.conf and loading priority of network cards

2006-06-22 Thread dick hoogendijk
On Thu, 22 Jun 2006 21:51:15 +1000
Mikhail Goriachev <[EMAIL PROTECTED]> wrote:

> dick hoogendijk wrote:
> > I have tow nics: a re0 (cabled) and an ath0 (wifi) card. I want the
> > latter to use dhcp like this:
> > 
> > defaultrouter="192.168.11.1"
> > hostname="arwen.nagual.st"
> > ifconfig_re0="192.168.11.29 netmask 255.255.255.0"
> > ifconfig_ath0="dhcp ssid air01 nwkey 0xc1e1639b753021ab6d64be2575
> > hidessid authmode shared"
> > 
> > What happens is that the ath0 card gets loaded first (not wanted!)
> > plus the dhcp setting changes my resolv.conf (not wanted either).
> > 
> > How do I get this changed? re0 first, than my ath0 and NO changes to
> > resolv.conf?
> > 
> > System: freebsd-6.1R
> > 
> 
> 
> Not sure about initialising interfaces in specific order but if you
> don't want to accept changes from a DHCP then:
> 
>   man dhclient.conf (look at supersede)

Yes, I know. I foudn something like that on google. Also a file named
dhclient-enter-hooks seems to do the trick, but I miss the option to
just say "don't use my existing resolv.conf" badly. On linux it's
easier as I remember (but that's years ago, so things might have
changed there too.

The initialising in a specific order is more important to me at the
moment. Anybody?

-- 
dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE
++ Running FreeBSD 6.1 ++ The Power to Serve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: dhcp resolv.conf and loading priority of network cards

2006-06-22 Thread Mikhail Goriachev
dick hoogendijk wrote:
> I have tow nics: a re0 (cabled) and an ath0 (wifi) card. I want the
> latter to use dhcp like this:
> 
> defaultrouter="192.168.11.1"
> hostname="arwen.nagual.st"
> ifconfig_re0="192.168.11.29 netmask 255.255.255.0"
> ifconfig_ath0="dhcp ssid air01 nwkey 0xc1e1639b753021ab6d64be2575
> hidessid authmode shared"
> 
> What happens is that the ath0 card gets loaded first (not wanted!) plus
> the dhcp setting changes my resolv.conf (not wanted either).
> 
> How do I get this changed? re0 first, than my ath0 and NO changes to
> resolv.conf?
> 
> System: freebsd-6.1R
> 


Not sure about initialising interfaces in specific order but if you
don't want to accept changes from a DHCP then:

man dhclient.conf (look at supersede)


Cheers,
Mikhail.


-- 
Mikhail Goriachev
Webanoide

Telephone: +61 (0)3 62252501
Mobile Phone: +61 (0)4 38255158
E-Mail: [EMAIL PROTECTED]
Web: http://www.webanoide.org

PGP Key ID: 0x4E148A3B
PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


dhcp resolv.conf and loading priority of network cards

2006-06-22 Thread dick hoogendijk
I have tow nics: a re0 (cabled) and an ath0 (wifi) card. I want the
latter to use dhcp like this:

defaultrouter="192.168.11.1"
hostname="arwen.nagual.st"
ifconfig_re0="192.168.11.29 netmask 255.255.255.0"
ifconfig_ath0="dhcp ssid air01 nwkey 0xc1e1639b753021ab6d64be2575
hidessid authmode shared"

What happens is that the ath0 card gets loaded first (not wanted!) plus
the dhcp setting changes my resolv.conf (not wanted either).

How do I get this changed? re0 first, than my ath0 and NO changes to
resolv.conf?

System: freebsd-6.1R

-- 
dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE
++ Running FreeBSD 6.1 ++ The Power to Serve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor

> -Original Message-
> From: fbsd [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 4 May 2006 10:56 AM
> To: Murray Taylor
> Cc: freebsd-questions
> Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
> 
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Murray
> Taylor
> > Sent: Sunday, April 30, 2006 7:56 PM
> > To: Lowell Gilbert
> > Cc: freebsd-questions@freebsd.org
> > Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
> >
> >
> > Murray.
> >
> > Using your scripts as a example I coded the following script.
> > I can not get the notification logger and email to function.
> > I am running postfix launched by the sendmail wrappers on a FreeBSD 
> > 6.0 system.
> > I am also using the built in dhclient that comes with the base 
> > install.
> > Could you post the isc_dhclient-script so I can compare it 
> to the one 
> > that comes with the base install for differences that may 
> cause this 
> > behavior?
> > Any other help would be appreciated.
> >
> >
> > When this script runs the logger statements do not create 
> any message 
> > in the targeted log files.
> > IF I execute the same logger statements from the command line they 
> > work as expected.
> > This is the boot time messages with mail code commented out.
> >
> > dc0: link state changed to DOWN
> > dc0: no link dc0: link state changed to UP  got link
> > dc0: link state changed to DOWN
> > DHCPREQUEST on dc0 to 255.255.255.255 port 67
> > dc0: link state changed to UP
> > DHCPACK from 10.0.10.2
> > dc0: link state changed to DOWN
> > bound to 10.0.10.4 -- renewal in 43200 seconds.
> >
> >
> > IF I execute the cat command to issue the notification 
> email from the 
> > command line it works fine, but when used in the script I get these 
> > messages during boot process.
> >
> > "~/.mailrc": No match.
> > DHCPREQUEST on dc0 to 255.255.255.255 port 67
> > /libexec/ld-elf.so.1: Shared object "libpcre.so.0" not 
> found, required 
> > by "send-mail"
> > dc0: link state changed to UP
> > DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from
> 10.0.10.2
> > dc0: link state changed to DOWN
> > bound to 10.0.10.4 -- renewal in 43200 seconds.
> >
> >
> >
> >
> > #!/bin/sh
> >
> > #  Start of refresh dhcpd dns ip script # # 
> > This script will propagate to dhcpd the changed dns servers ip # 
> > address which dhcp-client puts in resolv.conf.
> > #
> > # In dhcpd.conf replace the "option domain-name-servers" line with 
> > this # #  include "/etc/dhcpd.name-servers"; # # Script 
> uses the dhcpc 
> > variables to build temp line in dhcpd format.
> > # Then compare temp content to production content.
> > # If different replace production content with new content 
> from temp # 
> > and restart dhcp to reread dhcpd.conf containing new ISP dns ip 
> > addresses.
> > #
> > # logging event and sending email to user root is optional.
> > #
> > # Note: All LAN machines using dhcpd will not get new ISP dns ip # 
> > addresses until they reboot or their lease comes up for
> renewal.
> > #
> > # Each of the following lines must be one long line. IE: no wrap 
> > around
> >
> 
> >
> > # load my_domain_name_servers variable with ISP dns ip 
> addresses from 
> > dhcpc my_domain_name_servers=`echo $new_domain_name_servers 
> | sed -e 
> > 's/ /, /g'`
> >
> > # Create single line in file to be included in dhcpd.conf 
> echo "option 
> > domain-name-servers $my_domain_name_servers ;" > 
> > /etc/dhcpd.name-servers.tmp
> >
> > # See if different from what production file contains cmp -s 
> > /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers if [ $?
> > -gt 0 ]; then
> >   # move the new file into place
> >   mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
> >   # restart dhcp using whatever is appropriate for your platform
> >   #service dhcpd restart
> >   #/usr/local/etc/rc.d/isc-dhcpd.sh restart -q
> >   # Write message to /var/log/dhcpc.log to document event.
> >   logger -p user.warning -t dhclient Your ISP DNS IP addresses 
> > changed.
> >   # Write message to /var/log/dhcpd.log to document event.
> >   logger -p local1.warning -t dhclient Your ISP DNS I

RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor
> -Original Message-
> From: fbsd [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 4 May 2006 11:02 AM
> To: Murray Taylor
> Cc: freebsd-questions
> Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
> 
> 
> 
> The script I sent are operational on FBSD 4.11 with the 
> enter/exit-hooks scripts that are part of the base install.
> NB Dont forget I run the ipf firewall rewrite rules script 
> manually as root when my IP number changes, but the DHCP -> 
> resolv.conf is automatic via exit-hooks
> 
> The scripts are always called by dhclient, what I put in them 
> is what I attached.
> 
> And I am also using Postfix ... As far as I remenber pcre is 
> only needed by Postfix if you use pcre: regular 
> expression type files in main.cf. If you use 
> regexp: then pcre is not used.
> 
> 
> Murray Taylor
> 
> 
> ---
> ---
> 
> I checked postfix main.default.cf and find no "pcre" or "regexp"
> options.
> Please explain what you are talking about.
> 
> Thanks for your help
>

/usr/local/etc/postfix/dist-header_checks

these are optional elements you can add to main.cf.

if you havent decided to use them then they wont be in main.cf

try  grep pcre: *   in the /usr/local/etc/postfix directory

this will find where you may have used them.  
generally only used on various lookup tables etc..


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: [EMAIL PROTECTED] 

--
"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
  Albert Einstein 
-- 
---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

***This Email has been scanned for Viruses by MailMarshal.***
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread fbsd


The script I sent are operational on FBSD 4.11
with the enter/exit-hooks scripts that are
part of the base install.
NB Dont forget I run the ipf firewall rewrite rules script manually
as
root
when my IP number changes, but the DHCP -> resolv.conf is automatic
via exit-hooks

The scripts are always called by dhclient, what I put in them
is what I attached.

And I am also using Postfix ... As far as I remenber pcre is only
needed by Postfix if you use pcre: regular expression
type files in main.cf. If you use regexp: then pcre is
not
used.


Murray Taylor


---
---

I checked postfix main.default.cf and find no "pcre" or "regexp"
options.
Please explain what you are talking about.

Thanks for your help

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


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread fbsd
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Murray
Taylor
> Sent: Sunday, April 30, 2006 7:56 PM
> To: Lowell Gilbert
> Cc: freebsd-questions@freebsd.org
> Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
>
>
> Murray.
>
> Using your scripts as a example I coded the following script.
> I can not get the notification logger and email to function.
> I am running postfix launched by the sendmail wrappers on a
> FreeBSD 6.0 system.
> I am also using the built in dhclient that comes with the
> base install.
> Could you post the isc_dhclient-script so I can compare it to
> the one that comes with the base install for differences that
> may cause this behavior?
> Any other help would be appreciated.
>
>
> When this script runs the logger statements do not create any
> message in the targeted log files.
> IF I execute the same logger statements from the command line
> they work as expected.
> This is the boot time messages with mail code commented out.
>
> dc0: link state changed to DOWN
> dc0: no link dc0: link state changed to UP  got link
> dc0: link state changed to DOWN
> DHCPREQUEST on dc0 to 255.255.255.255 port 67
> dc0: link state changed to UP
> DHCPACK from 10.0.10.2
> dc0: link state changed to DOWN
> bound to 10.0.10.4 -- renewal in 43200 seconds.
>
>
> IF I execute the cat command to issue the notification email
> from the command line it works fine, but when used in the
> script I get these messages during boot process.
>
> "~/.mailrc": No match.
> DHCPREQUEST on dc0 to 255.255.255.255 port 67
> /libexec/ld-elf.so.1: Shared object "libpcre.so.0" not found,
> required by "send-mail"
> dc0: link state changed to UP
> DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from
10.0.10.2
> dc0: link state changed to DOWN
> bound to 10.0.10.4 -- renewal in 43200 seconds.
>
>
>
>
> #!/bin/sh
>
> #  Start of refresh dhcpd dns ip script
> # # This script will propagate to dhcpd the
> changed dns servers ip # address which dhcp-client puts in
> resolv.conf.
> #
> # In dhcpd.conf replace the "option domain-name-servers" line
> with this # #  include "/etc/dhcpd.name-servers"; # # Script
> uses the dhcpc variables to build temp line in dhcpd format.
> # Then compare temp content to production content.
> # If different replace production content with new content
> from temp # and restart dhcp to reread dhcpd.conf containing
> new ISP dns ip addresses.
> #
> # logging event and sending email to user root is optional.
> #
> # Note: All LAN machines using dhcpd will not get new ISP dns
> ip # addresses until they reboot or their lease comes up for
renewal.
> #
> # Each of the following lines must be one long line. IE: no
> wrap around
>

>
> # load my_domain_name_servers variable with ISP dns ip
> addresses from dhcpc my_domain_name_servers=`echo
> $new_domain_name_servers | sed -e 's/ /, /g'`
>
> # Create single line in file to be included in dhcpd.conf
> echo "option domain-name-servers $my_domain_name_servers ;" >
> /etc/dhcpd.name-servers.tmp
>
> # See if different from what production file contains cmp -s
> /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers if [ $?
> -gt 0 ]; then
>   # move the new file into place
>   mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
>   # restart dhcp using whatever is appropriate for your platform
>   #service dhcpd restart
>   #/usr/local/etc/rc.d/isc-dhcpd.sh restart -q
>   # Write message to /var/log/dhcpc.log to document event.
>   logger -p user.warning -t dhclient Your ISP DNS IP
> addresses changed.
>   # Write message to /var/log/dhcpd.log to document event.
>   logger -p local1.warning -t dhclient Your ISP DNS IP
> addresses changed.
>
>   # Send notification email to root user. This can wrap to next
line.
> #  cat << EOF | mail -s "dhcp client changed ISP DNS IP addresses"
> root
> #The dhclient-exit-hook script was invoked and has determined
> that your #ISP changed the IP address of their DNS servers.
> The new values have been #auto updated to dhcpd.conf and dhcp
> restarted so they are now in effect.
> #
> #Note: All LAN machines using dhcpd will not start using the
> new ISP dns #ip addresses until they reboot or their lease
> comes up for renewal.
> #EOF
> fi
> rm -f /etc/dhcpd.name-servers.tmp
> ###  End of refresh dhcpd dns ip script
> ###

The script I sent are operational on FBSD 4.11
with the enter/exit-hooks scripts that ar

RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor
> -Original Message-
> From: fbsd [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 3 May 2006 10:36 PM
> To: Murray Taylor
> Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Lowell 
> > Gilbert
> > Sent: Friday, 28 April 2006 11:09 PM
> > To: [EMAIL PROTECTED]
> > Cc: freebsd-questions@freebsd.org
> > Subject: Re: Getting DHCP to use resolv.conf?
> >
> > "fbsd" <[EMAIL PROTECTED]> writes:
> >
> > > Does anyone have a script that does this, that they can share?
> >
> > It will be pretty similar to the script I posted recently 
> for updating 
> > your local named's forwarders list automatically.
> > [Which is another approach to the same problem, and will generally 
> > perform better.]
> >
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Behalf Of Bill
> Moran
> > > Sent: Wednesday, April 26, 2006 5:06 PM
> > > To: Telting
> > > Cc: freebsd-questions@freebsd.org
> > > Subject: Re: Getting DHCP to use resolv.conf?
> > >
> > >
> > > On Wed, 26 Apr 2006 13:56:57 -0700
> > > Telting <[EMAIL PROTECTED]> wrote:
> > >
> > > > I would like to know how I can propagate the dns servers which
> the
> > > dhcp
> > > > client puts in resolv.conf to dhcpd.  I only see how I can
> only
> > > > explicitly list a domain server with "option
> domain-name-servers".
> > > How
> > > > do I propogate non static dns servers?
> > >
> > > Write a script to updated the dhcpd.conf file when resolv.conf 
> > > changes.  dhclient allows you to create hooks that
> > automagically run a
> > > script of your choosing when a new lease is obtained.
> > >
> > > Or you could search the list archives for when this exact
> > question was
> > > asked a few weeks ago.
> > >
> > > --
> > > Bill Moran
> > > Collaborative Fusion Inc.
> >
> >
> >
> >man dhclient-script
> >
> >and my enter and exit scripts below from my home boxen
> >
> >
> >NB I use ddclient from ports to update dns stuff at dyndns.org and
> the
> >example.com should be replaced with your domain name in the
> enter-hooks
> >script.
> >
> >These are not totally automatic in what they do, as I prefer to
> 'see and
> >know' certain changes from my ISP so that is the reason for the
> email
> >setup
> >
> >Murray Taylor
> >
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Murray Taylor
> Sent: Sunday, April 30, 2006 7:56 PM
> To: Lowell Gilbert
> Cc: freebsd-questions@freebsd.org
> Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
> 
> 
> Murray.
> 
> Using your scripts as a example I coded the following script.
> I can not get the notification logger and email to function.
> I am running postfix launched by the sendmail wrappers on a 
> FreeBSD 6.0 system.
> I am also using the built in dhclient that comes with the 
> base install.
> Could you post the isc_dhclient-script so I can compare it to 
> the one that comes with the base install for differences that 
> may cause this behavior?
> Any other help would be appreciated.
> 
> 
> When this script runs the logger statements do not create any 
> message in the targeted log files.
> IF I execute the same logger statements from the command line 
> they work as expected.
> This is the boot time messages with mail code commented out.
> 
> dc0: link state changed to DOWN
> dc0: no link dc0: link state changed to UP  got link
> dc0: link state changed to DOWN
> DHCPREQUEST on dc0 to 255.255.255.255 port 67
> dc0: link state changed to UP
> DHCPACK from 10.0.10.2
> dc0: link state changed to DOWN
> bound to 10.0.10.4 -- renewal in 43200 seconds.
> 
> 
> IF I execute the cat command to issue the notification email 
> from the command line it works fine, but when used in the 
> script I get these messages during boot process.
> 
> "~/.mailrc": No match.
> DHCPREQUEST on dc0 to 255.255.255.255 port 67
> /libexec/ld-elf.so.1: Shared object "libpcre.so.0" not found, 
> required by "send-mail"
> dc0: link state changed to UP
> DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from 10.0.10.2
> dc0: link state changed to DOWN
> bound

RE: Getting DHCP to use resolv.conf?

2006-04-30 Thread fbsd
I got this from the ISC-dhcp questions list.

Note: This might not work, Not tested, No guarantees.
Use this as starter code and after testing post what
you get working for the list archives.

In dhcpd.conf comment out the line "option domain-name-servers"
and add following line

  include "/etc/dhcpd.name-servers";

This will include the contents of the named file into dhcpd.conf.
It is easier to manipulate a small separate file containing only
a single line, rather than trying to manage the whole
dhcpd.conf file

Every time dhcp-client runs it will try to run
/etc/dhclient-exit-hooks file if it exists.

Create a empty /etc/dhclient-exit-hooks file and populate with this

###  Start of refresh dhcpd dns ip  
# This script will propagate to dhcpd the changed dns servers ip
address
# which dhcp-client puts in resolv.conf.
#
# In dhcpd.conf replace the "option domain-name-servers" line with
this
#
#  include "/etc/dhcpd.name-servers";
#
# Spript uses the dhcpc variables to build temp line in dhcpd
format.
# Then compare temp content to production content.
# If different replace production content with new content from
temp,
# and restart dhcp to reread dhcpd.conf containing new ISP dns ip
addresses.
#
# logging event and sending email to user root is optional.
#
# Note: All LAN machines using dhcpd will not get new ISP dns ip
addresses
# until they reboot or their lease comes up for renewal.
#
# Each of the following lines must be one long line. IE: no wrap
arounds



# load my_domain_name_servers variable with ISP dns ip addresses
from dhcpc
my_domain_name_servers=`echo $new_domain_name_servers | sed -e 's/
/, /g'`

# Create single line in file to be included in dhcpd.conf
echo "option domain-name-servers $my_domain_name_servers ;" >
/etc/dhcpd.name-servers.tmp

# See if different from what production file contains
cmp -s /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
if [ $? -gt 0 ]; then
  # move the new file into place
  mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
  # restart dhcp using whatever is appropriate for your platform
  #service dhcpd restart
  /usr/local/etc/rc.d/isc-dhcpd.sh restart -q
  # Write message to log to document event.
  logger -t dhclient ISP DNS IP address changed to $new_ip_address
  # Send notification email to root user. This can wrap to next
line.
  mail -s "dhcp client changed ISP DNS IP addresses" root The
dhclient-exit-hooks script was invoked and has determined that your
ISP changed the IP address of their DNS servers. The new values have
been auto updated to dhcpd.conf and dhcpd restarted so they are now
in effect.

Note: All LAN machines using dhcpd will not start using the new ISP
dns ip addresses until they reboot or their lease comes up for
renewal.
fi

rm -f /etc/dhcpd.name-servers.tmp

###  End of refresh dhcpd dns ip  




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Telting
Sent: Wednesday, April 26, 2006 3:40 PM
To: freebsd-questions@freebsd.org
Subject: Getting DHCP to use resolv.conf?


I would like to know how I can propagate the dns servers which the
dhcp
client puts in resolv.conf to dhcpd.  I only see how I can only
explicitly list a domain server with "option domain-name-servers".
How
do I propogate non static dns servers?

Chris

___
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]"


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-04-30 Thread Murray Taylor
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Lowell Gilbert
> Sent: Friday, 28 April 2006 11:09 PM
> To: [EMAIL PROTECTED]
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Getting DHCP to use resolv.conf?
> 
> "fbsd" <[EMAIL PROTECTED]> writes:
> 
> > Does anyone have a script that does this, that they can share?
> 
> It will be pretty similar to the script I posted recently for 
> updating your local named's forwarders list automatically.  
> [Which is another approach to the same problem, and will 
> generally perform better.]
> 
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
> > Sent: Wednesday, April 26, 2006 5:06 PM
> > To: Telting
> > Cc: freebsd-questions@freebsd.org
> > Subject: Re: Getting DHCP to use resolv.conf?
> > 
> > 
> > On Wed, 26 Apr 2006 13:56:57 -0700
> > Telting <[EMAIL PROTECTED]> wrote:
> > 
> > > I would like to know how I can propagate the dns servers which the
> > dhcp
> > > client puts in resolv.conf to dhcpd.  I only see how I can only 
> > > explicitly list a domain server with "option domain-name-servers".
> > How
> > > do I propogate non static dns servers?
> > 
> > Write a script to updated the dhcpd.conf file when resolv.conf 
> > changes.  dhclient allows you to create hooks that 
> automagically run a 
> > script of your choosing when a new lease is obtained.
> > 
> > Or you could search the list archives for when this exact 
> question was 
> > asked a few weeks ago.
> > 
> > --
> > Bill Moran
> > Collaborative Fusion Inc.
> 


man dhclient-script

and my enter and exit scripts below from my home boxen


NB I use ddclient from ports to update dns stuff at dyndns.org and the
example.com should be replaced with your domain name in the enter-hooks
script.

These are not totally automatic in what they do, as I prefer to 'see and
know'
certain changes from my ISP so that is the reason for the email
setup


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: [EMAIL PROTECTED] 

--
"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
  Albert Einstein 
--

 

---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

***This Email has been scanned for Viruses by MailMarshal.***


dhclient-enter-hooks
Description: dhclient-enter-hooks


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

Re: Getting DHCP to use resolv.conf?

2006-04-28 Thread Lowell Gilbert
Don't top-post, please.

"fbsd" <[EMAIL PROTECTED]> writes:

> Does anyone have a script that does this, that they can share?

It will be pretty similar to the script I posted recently for updating
your local named's forwarders list automatically.  [Which is another
approach to the same problem, and will generally perform better.]

> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
> Sent: Wednesday, April 26, 2006 5:06 PM
> To: Telting
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Getting DHCP to use resolv.conf?
> 
> 
> On Wed, 26 Apr 2006 13:56:57 -0700
> Telting <[EMAIL PROTECTED]> wrote:
> 
> > I would like to know how I can propagate the dns servers which the
> dhcp
> > client puts in resolv.conf to dhcpd.  I only see how I can only
> > explicitly list a domain server with "option domain-name-servers".
> How
> > do I propogate non static dns servers?
> 
> Write a script to updated the dhcpd.conf file when resolv.conf
> changes.  dhclient allows you to create hooks that automagically
> run a script of your choosing when a new lease is obtained.
> 
> Or you could search the list archives for when this exact question
> was asked a few weeks ago.
> 
> --
> Bill Moran
> Collaborative Fusion Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Getting DHCP to use resolv.conf?

2006-04-27 Thread fbsd
I read the man dhclient.conf(5) and paid special attention to the
part about
prepend domain-name-servers.

It does not say anything about passing the dns info dhcp client puts
into resolv.conf onto the dhcpd.conf "option domain-name-servers"
statement.

I don't think you understood the original question.
I may be wrong so please explain how dhcp client prepend
domain-name-servers
option effects the dhcpd config file?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of michael
johnson
Sent: Thursday, April 27, 2006 7:36 AM
To: Bill Moran
Cc: Telting; freebsd-questions@freebsd.org
Subject: Re: Getting DHCP to use resolv.conf?


On 4/26/06, Bill Moran <[EMAIL PROTECTED]> wrote:
>
> On Wed, 26 Apr 2006 13:56:57 -0700
> Telting <[EMAIL PROTECTED]> wrote:
>
> > I would like to know how I can propagate the dns servers which
the dhcp
> > client puts in resolv.conf to dhcpd.  I only see how I can only
> > explicitly list a domain server with "option
domain-name-servers".  How
> > do I propogate non static dns servers?
>
> Write a script to updated the dhcpd.conf file when resolv.conf
> changes.  dhclient allows you to create hooks that automagically
> run a script of your choosing when a new lease is obtained.
>
> Or you could search the list archives for when this exact question
> was asked a few weeks ago.


look at dhclient.conf(5) and look at the part about
prepend domain-name-servers

Michael


--
> Bill Moran
> Collaborative Fusion Inc.
> ___
> 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]"

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


Re: Getting DHCP to use resolv.conf?

2006-04-27 Thread michael johnson
On 4/26/06, Bill Moran <[EMAIL PROTECTED]> wrote:
>
> On Wed, 26 Apr 2006 13:56:57 -0700
> Telting <[EMAIL PROTECTED]> wrote:
>
> > I would like to know how I can propagate the dns servers which the dhcp
> > client puts in resolv.conf to dhcpd.  I only see how I can only
> > explicitly list a domain server with "option domain-name-servers".  How
> > do I propogate non static dns servers?
>
> Write a script to updated the dhcpd.conf file when resolv.conf
> changes.  dhclient allows you to create hooks that automagically
> run a script of your choosing when a new lease is obtained.
>
> Or you could search the list archives for when this exact question
> was asked a few weeks ago.


look at dhclient.conf(5) and look at the part about
prepend domain-name-servers

Michael


--
> Bill Moran
> Collaborative Fusion Inc.
> ___
> 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]"


RE: Getting DHCP to use resolv.conf?

2006-04-27 Thread fbsd

Does anyone have a script that does this, that they can share?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
Sent: Wednesday, April 26, 2006 5:06 PM
To: Telting
Cc: freebsd-questions@freebsd.org
Subject: Re: Getting DHCP to use resolv.conf?


On Wed, 26 Apr 2006 13:56:57 -0700
Telting <[EMAIL PROTECTED]> wrote:

> I would like to know how I can propagate the dns servers which the
dhcp
> client puts in resolv.conf to dhcpd.  I only see how I can only
> explicitly list a domain server with "option domain-name-servers".
How
> do I propogate non static dns servers?

Write a script to updated the dhcpd.conf file when resolv.conf
changes.  dhclient allows you to create hooks that automagically
run a script of your choosing when a new lease is obtained.

Or you could search the list archives for when this exact question
was asked a few weeks ago.

--
Bill Moran
Collaborative Fusion Inc.
___
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]"


Re: Getting DHCP to use resolv.conf?

2006-04-26 Thread Bill Moran
On Wed, 26 Apr 2006 13:56:57 -0700
Telting <[EMAIL PROTECTED]> wrote:

> I would like to know how I can propagate the dns servers which the dhcp
> client puts in resolv.conf to dhcpd.  I only see how I can only
> explicitly list a domain server with "option domain-name-servers".  How
> do I propogate non static dns servers?

Write a script to updated the dhcpd.conf file when resolv.conf
changes.  dhclient allows you to create hooks that automagically
run a script of your choosing when a new lease is obtained.

Or you could search the list archives for when this exact question
was asked a few weeks ago.

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


Getting DHCP to use resolv.conf?

2006-04-26 Thread Telting

I would like to know how I can propagate the dns servers which the dhcp
client puts in resolv.conf to dhcpd.  I only see how I can only
explicitly list a domain server with "option domain-name-servers".  How
do I propogate non static dns servers?

Chris


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


Getting DHCP to use resolv.conf?

2006-04-26 Thread Telting
I would like to know how I can propagate the dns servers which the dhcp 
client puts in resolv.conf to dhcpd.  I only see how I can only 
explicitly list a domain server with "option domain-name-servers".  How 
do I propogate non static dns servers?


Chris

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


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread Charles Swiger

On Apr 10, 2006, at 9:54 AM, [EMAIL PROTECTED] wrote:

$ cat /etc/resolv.conf
domain Sisis.de
nameserver 10.0.1.201
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy

But only the 1st one (10.0.1.201) is contacted to make the name lookup
(I've checked this with trussing a 'ping whatever.domain.com') and if
it does not know the addr, while the second one would know it, it does
not resolve.

Do I miss something?


If your nameserver at 10.whatever is returning NXDOMAIN, the resolver  
has gotten an answer and never asks for a second opinion from other  
nameservers.  Fix your 10.whatever nameserver...


--
-Chuck

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


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread Alex Zbyslaw

[EMAIL PROTECTED] wrote:


El día Monday, April 10, 2006 a las 04:07:34PM +0100, Alex Zbyslaw escribió:
 

There's nothing to stop you configuring that local nameserver to use 
your two "backups" for names that it cannot resolve.


You could then leave the two backups in /etc/resolv.conf but if your 
local nameserver is authoritative for your local domain, then you 
probably want to know if it goes away, and those backups won't be able 
to look up names in your local domain.


I'm making some assumptions about why you set things up this way in the 
first place, and I may be wrong, but there's too little info in your 
post to give definitive suggestions.
   



The anderlying problem is that we are three companies, now connected
through VPN tunnels. Each company runs it's own DNS server internaly and
without publicating all its names to Internet. The three DNS are
10.0.1.201 (mine one), xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy. 


Any idea? Yes, in the future we will unify the whole zone, but this is
not a short term option...
 

Presumably all three ranges have distinct domain names  E.g. company1.de 
company2.de company3.de


I am no expert of DNS, but isn't all you need for each "company" to run 
nameservers which are slaves (secondaries) for the other 2 as well as 
master of their own?  So the nameserver at company1 is master for 
company1.de and is a slave for company2.de and company3.de etc.


Of course, you might want some redundancy in that scenario, with each 
company running DNS on another server as well, and that one being a 
slave for all 3 domains.


If you don't know enough to do that, I strongly recommend getting the 
latest edition of O'Reilly "DNS and BIND"; and you should find BIND doc 
on your FreeBSD system starting in /usr/share/doc/bind9/arm/Bv9ARM.html.


Best,

--Alex



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


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread guru
El día Monday, April 10, 2006 a las 04:07:34PM +0100, Alex Zbyslaw escribió:

> [EMAIL PROTECTED] wrote:
> 
> >El día Monday, April 10, 2006 a las 10:44:52AM -0400, Ken Stevenson 
> >escribió:
> >
> > 
> >
> >>I think the problem is that once your first server responds with a 
> >>"domain not found", that's considered an answer to your query. It 
> >>doesn't try another DNS server just to see if it gets a different 
> >>answer. If you were to disable the DNS server on 10.0.1.201, then it 
> >>would use xxx.xxx.xxx.xxx or yyy.yyy.yyy.yyy to resolve the query.
> >>   
> >>
> >
> >Yes, you're right. It is said in (...) that the fall down only works
> >on timeout. I did not read carefully enough, stupid as I am. :-(
> > 
> >
> There's nothing to stop you configuring that local nameserver to use 
> your two "backups" for names that it cannot resolve.
> 
> You could then leave the two backups in /etc/resolv.conf but if your 
> local nameserver is authoritative for your local domain, then you 
> probably want to know if it goes away, and those backups won't be able 
> to look up names in your local domain.
> 
> I'm making some assumptions about why you set things up this way in the 
> first place, and I may be wrong, but there's too little info in your 
> post to give definitive suggestions.

The anderlying problem is that we are three companies, now connected
through VPN tunnels. Each company runs it's own DNS server internaly and
without publicating all its names to Internet. The three DNS are
10.0.1.201 (mine one), xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy. 

Any idea? Yes, in the future we will unify the whole zone, but this is
not a short term option...

matthias
-- 
Matthias Apitz / Sisis Informationssysteme GmbH
ein Tochterunternehmen der OCLC PICA B.V. Leiden (NL)
D-82041 Oberhaching, Gruenwalder Weg 28g
Fon: +49 89 / 61308-351, Fax: -399, Mobile +49 170 4527211
http://www.sisis.de/~guru/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread Alex Zbyslaw

[EMAIL PROTECTED] wrote:


El día Monday, April 10, 2006 a las 10:44:52AM -0400, Ken Stevenson escribió:

 

I think the problem is that once your first server responds with a 
"domain not found", that's considered an answer to your query. It 
doesn't try another DNS server just to see if it gets a different 
answer. If you were to disable the DNS server on 10.0.1.201, then it 
would use xxx.xxx.xxx.xxx or yyy.yyy.yyy.yyy to resolve the query.
   



Yes, you're right. It is said in (...) that the fall down only works
on timeout. I did not read carefully enough, stupid as I am. :-(
 

There's nothing to stop you configuring that local nameserver to use 
your two "backups" for names that it cannot resolve.


You could then leave the two backups in /etc/resolv.conf but if your 
local nameserver is authoritative for your local domain, then you 
probably want to know if it goes away, and those backups won't be able 
to look up names in your local domain.


I'm making some assumptions about why you set things up this way in the 
first place, and I may be wrong, but there's too little info in your 
post to give definitive suggestions.


--Alex



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


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread guru
El día Monday, April 10, 2006 a las 10:44:52AM -0400, Ken Stevenson escribió:

> I think the problem is that once your first server responds with a 
> "domain not found", that's considered an answer to your query. It 
> doesn't try another DNS server just to see if it gets a different 
> answer. If you were to disable the DNS server on 10.0.1.201, then it 
> would use xxx.xxx.xxx.xxx or yyy.yyy.yyy.yyy to resolve the query.

Yes, you're right. It is said in (...) that the fall down only works
on timeout. I did not read carefully enough, stupid as I am. :-(

matthias

-- 
Matthias Apitz / Sisis Informationssysteme GmbH
ein Tochterunternehmen der OCLC PICA B.V. Leiden (NL)
D-82041 Oberhaching, Gruenwalder Weg 28g
Fon: +49 89 / 61308-351, Fax: -399, Mobile +49 170 4527211
http://www.sisis.de/~guru/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: /etc/resolv.conf with 3 nameservers

2006-04-10 Thread Ken Stevenson

[EMAIL PROTECTED] wrote:

Hi,

The man page of resolv.conf claims:

 The different configuration options are:

 nameserver  Internet address (in dot notation) of a name server that the
 resolver should query.  Up to MAXNS (currently 3) name
 servers may be listed, one per keyword

I've three DNS server in my /etc/resolv.conf in 6.0-REL:

$ cat /etc/resolv.conf
domain Sisis.de
nameserver 10.0.1.201
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy

But only the 1st one (10.0.1.201) is contacted to make the name lookup
(I've checked this with trussing a 'ping whatever.domain.com') and if
it does not know the addr, while the second one would know it, it does
not resolve.

Do I miss something?
Thx

matthias

I think the problem is that once your first server responds with a 
"domain not found", that's considered an answer to your query. It 
doesn't try another DNS server just to see if it gets a different 
answer. If you were to disable the DNS server on 10.0.1.201, then it 
would use xxx.xxx.xxx.xxx or yyy.yyy.yyy.yyy to resolve the query.


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


/etc/resolv.conf with 3 nameservers

2006-04-10 Thread guru

Hi,

The man page of resolv.conf claims:

 The different configuration options are:

 nameserver  Internet address (in dot notation) of a name server that the
 resolver should query.  Up to MAXNS (currently 3) name
 servers may be listed, one per keyword

I've three DNS server in my /etc/resolv.conf in 6.0-REL:

$ cat /etc/resolv.conf
domain Sisis.de
nameserver 10.0.1.201
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy

But only the 1st one (10.0.1.201) is contacted to make the name lookup
(I've checked this with trussing a 'ping whatever.domain.com') and if
it does not know the addr, while the second one would know it, it does
not resolve.

Do I miss something?
Thx

matthias

-- 
Matthias Apitz / Sisis Informationssysteme GmbH
ein Tochterunternehmen der OCLC PICA B.V. Leiden (NL)
D-82041 Oberhaching, Gruenwalder Weg 28g
Fon: +49 89 / 61308-351, Fax: -399, Mobile +49 170 4527211
http://www.sisis.de/~guru/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


man dhclient [was Re: resolv.conf getting rewritten at system startup]

2006-03-16 Thread Duane Whitty

Erik Trulsson wrote:

On Thu, Mar 16, 2006 at 05:29:45PM -0400, Duane Whitty wrote:
  

Hi all,

I am running FBSD 6.0-RELEASE

I use  DHCP to configure my network interface

Thanks in advance,


Duane

P.S.

Is there a man page for the dhcp client FBSD 6 is using
(what is FBSD 6 using)?



'man dhclient' should work fine.
FBSD 6 uses the OpenBSD dhclient (which I believe derive from an older
version of the ISC one.)

  

Hi,

Yes, man dhclient in FBSD 6 does work fine.  I misinterpreted
how to apply its instructions.

Duane

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


Re: resolv.conf getting rewritten at system startup

2006-03-16 Thread Erik Trulsson
On Thu, Mar 16, 2006 at 05:29:45PM -0400, Duane Whitty wrote:
> Hi all,
> 
> I am running FBSD 6.0-RELEASE
> 
> I use  DHCP to configure my network interface.
> At startup my resolv.conf is overwritten, setting my
> nameserver to the address of the router running DHCP.
> 
> I tried commenting out almost all of the rc.d/resolv
> startup script but to no avail.
> 
> I read the man page for dhcp-options and then proceeded to add
> option domain-name-servers a.b.c.d
> This was also of no help.
> 
> I then remembered something about FBSD 6 no longer using ISC dhcp client.
> 
> I am running BIND 9.3.1 with internal and external views of my namespace 
> set-up so
> it is imperative that I be able to tell hosts on the internal network 
> which name server
> to use.
> 
> If anyone has any ideas I'd appreciate the help.

Read the manpage for dhclient.conf(5) and look at the 'supersede' or
'prepend' directives.

E.g. If you always want to use a nameserver with IP 12.34.56.78
you would put the line

supersede domain-name-servers 12.34.56.78;

in /etc/dhclient.conf


> 
> Thanks in advance,
> 
> Duane
> 
> P.S.
> 
> Is there a man page for the dhcp client FBSD 6 is using
> (what is FBSD 6 using)?

'man dhclient' should work fine.
FBSD 6 uses the OpenBSD dhclient (which I believe derive from an older
version of the ISC one.)

-- 

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


Re: resolv.conf getting rewritten at system startup

2006-03-16 Thread Duane Whitty

Beech Rintoul wrote:

On Thursday 16 March 2006 12:29, Duane Whitty wrote:
  

Hi all,

I am running FBSD 6.0-RELEASE

I use  DHCP to configure my network interface.
At startup my resolv.conf is overwritten, setting my
nameserver to the address of the router running DHCP.

I tried commenting out almost all of the rc.d/resolv
startup script but to no avail.

I read the man page for dhcp-options and then proceeded to add
option domain-name-servers a.b.c.d
This was also of no help.

I then remembered something about FBSD 6 no longer using ISC dhcp client.

I am running BIND 9.3.1 with internal and external views of my namespace
set-up so
it is imperative that I be able to tell hosts on the internal network
which name server
to use.

If anyone has any ideas I'd appreciate the help.



You need to use supersede like this:

interface "ath0"   {
supersede domain-name "yourdomain.com";
supersede domain-name-servers 127.0.0.1;
}

See man dhclient.conf for more options.

Beech
  

Hi,

That worked perfectly.  Thanks to all for the quick responses.

Sincerely,

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


Re: resolv.conf getting rewritten at system startup

2006-03-16 Thread Erik Nørgaard

Duane Whitty wrote:


I use  DHCP to configure my network interface.
At startup my resolv.conf is overwritten, setting my
nameserver to the address of the router running DHCP.


dhclient, also the new one updates /etc/resolv.conf with the information 
received from the dhcp server. You can change things by configuring 
dhclient editing /etc/dhclient.conf


see dhclient.conf(5) and dhcp-options(5)

Cheers, Erik
--
Ph: +34.666334818  web: www.locolomo.org
S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt
Subject ID:  9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72
Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: resolv.conf getting rewritten at system startup

2006-03-16 Thread Beech Rintoul
On Thursday 16 March 2006 12:29, Duane Whitty wrote:
> Hi all,
>
> I am running FBSD 6.0-RELEASE
>
> I use  DHCP to configure my network interface.
> At startup my resolv.conf is overwritten, setting my
> nameserver to the address of the router running DHCP.
>
> I tried commenting out almost all of the rc.d/resolv
> startup script but to no avail.
>
> I read the man page for dhcp-options and then proceeded to add
> option domain-name-servers a.b.c.d
> This was also of no help.
>
> I then remembered something about FBSD 6 no longer using ISC dhcp client.
>
> I am running BIND 9.3.1 with internal and external views of my namespace
> set-up so
> it is imperative that I be able to tell hosts on the internal network
> which name server
> to use.
>
> If anyone has any ideas I'd appreciate the help.
>
You need to use supersede like this:

interface "ath0"   {
supersede domain-name "yourdomain.com";
supersede domain-name-servers 127.0.0.1;
}

See man dhclient.conf for more options.

Beech
-- 

---
Beech Rintoul - Sys. Administrator - [EMAIL PROTECTED]
/"\   ASCII Ribbon Campaign  | Mangohealth
\ / - NO HTML/RTF in e-mail  | 201 East 9Th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - XanGo - http://www.mangohealth.org
---













pgpUaQif4jJMl.pgp
Description: PGP signature


resolv.conf getting rewritten at system startup

2006-03-16 Thread Duane Whitty

Hi all,

I am running FBSD 6.0-RELEASE

I use  DHCP to configure my network interface.
At startup my resolv.conf is overwritten, setting my
nameserver to the address of the router running DHCP.

I tried commenting out almost all of the rc.d/resolv
startup script but to no avail.

I read the man page for dhcp-options and then proceeded to add
option domain-name-servers a.b.c.d
This was also of no help.

I then remembered something about FBSD 6 no longer using ISC dhcp client.

I am running BIND 9.3.1 with internal and external views of my namespace 
set-up so
it is imperative that I be able to tell hosts on the internal network 
which name server

to use.

If anyone has any ideas I'd appreciate the help.

Thanks in advance,

Duane

P.S.

Is there a man page for the dhcp client FBSD 6 is using
(what is FBSD 6 using)?

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


RE: resolv.conf

2005-08-16 Thread Ted Mittelstaedt
just set the resolv.conf read-only, that should take care of it.

Ted

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Ronny Machado
>C.
>Sent: Tuesday, August 16, 2005 7:07 AM
>To: freebsd-questions@freebsd.org
>Subject: RE: resolv.conf
>
>
>yep bro...that's it...
>
>-Mensaje original-
>De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nombre de
>Lowell Gilbert
>Enviado el: Martes, 16 de Agosto de 2005 10:02
>Para: Ronny Machado C.
>CC: freebsd-questions@freebsd.org
>Asunto: Re: resolv.conf
>
>
>"Ronny Machado C." <[EMAIL PROTECTED]> writes:
>
>> Hi list,
>>
>> I'm new to FreeBSD, and this is the first time I configure a
>FreeBSD box. Ok, let's get to the point: my problem is with DNS
>resolution, form some reason the resolv.conf changes after some
>time (10  to 20 minutes), from my DNS IP to the rl0 IP. Does
>any one know why? My machine is an AMD64/FreeBSD 5.3 with PPPoE
>for an ADSL connection,
>
>You are using DHCP on rl0, with a lease of an hour or less?
>___
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to
>"[EMAIL PROTECTED]"
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date:
>8/15/2005
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date: 8/15/2005

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


Re: resolv.conf

2005-08-16 Thread Micheal Patterson


.


- Original Message - 
From: "Ronny Machado C." <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, August 16, 2005 8:54 AM
Subject: resolv.conf


Hi list,

I'm new to FreeBSD, and this is the first time I configure a FreeBSD box. 
Ok, let's get to the point: my problem is with DNS resolution, form some 
reason the resolv.conf changes after some time (10  to 20 minutes), from my 
DNS IP to the rl0 IP. Does any one know why? My machine is an AMD64/FreeBSD 
5.3 with PPPoE for an ADSL connection,



greetings from .CL,

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



As you may have seen already, this is a common issue with systems running 
dhclient. It will overwrite the resolv.conf with the ISP provided dns 
information as soon as it obtains it from the dhcp server. To counter this, 
do this with your dhclient.conf file (/etc/dhclient.conf) and create a 
prepend entry for each server you want to answer your dns requests. Take 
note, the file is read from top to bottom and in the example below, 
127.0.0.1 would be the primary dns server for your system.


interface "rl0" {
   prepend domain-name-servers enteryourdnsiphere
   prepend domain-name-servers enteryourdnsiphere
   prepend domain-name-servers 127.0.0.1;
}

--

Micheal Patterson
Senior Communications Systems Engineer
405-917-0600

Confidentiality Notice:  This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message 


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


Re: resolv.conf

2005-08-16 Thread Jon Mercer
Ronny,

It sounds as though this is something to do with the DHCP client software,
which can be configured through /etc/dhclient.conf.

Something like the following might be a workaround, but  I'm
not an experienced user of PPPoE and may be barking up the wrong
tree.


interface "rl0" {
  prepend domain-name-servers ;
  request subnet-mask, broadcast-address,  time-offset, routers,
domain-name,   domain-name-servers,  hostname;
  require subnet-mask, domain-name-servers;
}

HTH,

Jon






On Tue, August 16, 2005 14:54, Ronny Machado C. wrote:
> Hi list,
>
> I'm new to FreeBSD, and this is the first time I configure a FreeBSD box.
> Ok, let's get to the point: my problem is with DNS resolution, form some
> reason the resolv.conf changes after some time (10  to 20 minutes), from
> my DNS IP to the rl0 IP. Does any one know why? My machine is an
> AMD64/FreeBSD 5.3 with PPPoE for an ADSL connection,
>
>
> greetings from .CL,
>
> pElA'0
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
>


---
Achean Ltdhttp://www.achean.com
Jon Mercer  [EMAIL PROTECTED]  Director
---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: resolv.conf

2005-08-16 Thread Ronny Machado C.
yep bro...that's it...

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nombre de
Lowell Gilbert
Enviado el: Martes, 16 de Agosto de 2005 10:02
Para: Ronny Machado C.
CC: freebsd-questions@freebsd.org
Asunto: Re: resolv.conf


"Ronny Machado C." <[EMAIL PROTECTED]> writes:

> Hi list,
> 
> I'm new to FreeBSD, and this is the first time I configure a FreeBSD box. Ok, 
> let's get to the point: my problem is with DNS resolution, form some reason 
> the resolv.conf changes after some time (10  to 20 minutes), from my DNS IP 
> to the rl0 IP. Does any one know why? My machine is an AMD64/FreeBSD 5.3 with 
> PPPoE for an ADSL connection, 

You are using DHCP on rl0, with a lease of an hour or less?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: resolv.conf

2005-08-16 Thread Lowell Gilbert
"Ronny Machado C." <[EMAIL PROTECTED]> writes:

> Hi list,
> 
> I'm new to FreeBSD, and this is the first time I configure a FreeBSD box. Ok, 
> let's get to the point: my problem is with DNS resolution, form some reason 
> the resolv.conf changes after some time (10  to 20 minutes), from my DNS IP 
> to the rl0 IP. Does any one know why? My machine is an AMD64/FreeBSD 5.3 with 
> PPPoE for an ADSL connection, 

You are using DHCP on rl0, with a lease of an hour or less?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


resolv.conf

2005-08-16 Thread Ronny Machado C.
Hi list,

I'm new to FreeBSD, and this is the first time I configure a FreeBSD box. Ok, 
let's get to the point: my problem is with DNS resolution, form some reason the 
resolv.conf changes after some time (10  to 20 minutes), from my DNS IP to the 
rl0 IP. Does any one know why? My machine is an AMD64/FreeBSD 5.3 with PPPoE 
for an ADSL connection, 


greetings from .CL, 

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


Re: /etc/resolv.conf and your ISP

2005-05-08 Thread Robert Huff

Glenn Dawson writes:

>  >My question is:  how to reliably keep your own nameserver in
>  >/etc/resolv.conf, and get around the frequent protocol updates that
>  >change/nullify your mods to /etc/resolv.conf.
>  
>  According to dhclient.conf(5):
>  
>  interface "foo" {
>   ...
>   supersede domain-name-servers 127.0.0.1;
>   ...
>  }
>  
>  would do the trick in your case.

See also the "prepend" option.
(I use "supersede" to keep my own domain, and "Prepend" to make
sure my DNS server is first on the list.)




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


Re: /etc/resolv.conf and your ISP

2005-05-08 Thread Glenn Dawson
At 12:49 PM 5/8/2005, Forrest Aldrich wrote:
I can think of a few ways to resolve this, but I thought to ask here.
I have Comcast for my ISP, and of course DHCP changes /etc/resolv.conf
during each update -- lately, they've been screwing things up bigtime,
such that I simply use my own "named" instance.
My question is:  how to reliably keep your own nameserver in
/etc/resolv.conf, and get around the frequent protocol updates that
change/nullify your mods to /etc/resolv.conf.
Perhaps just a regular script that does a diff and patch of it, or
simply copies over the file you want regularly.  Not elegant but it
would work.
According to dhclient.conf(5):
supersede [ option declaration ] ;
   If for some option the client should always  use  a  locally-configured
   value  or  values rather than whatever is supplied by the server, these
   values can be defined in the supersede statement.
I've never had to use this myself, but I would expect that something like:
interface "foo" {
...
supersede domain-name-servers 127.0.0.1;
...
}
would do the trick in your case.
-Glenn

I also wonder about creating a dhclient-exit script that would update
certain services automatically when your IP changes.
Thx.
___
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]"


Re: /etc/resolv.conf and your ISP

2005-05-08 Thread Forrest Aldrich
Also of note... if you change the bits on the file to nochg, so it can't
be updated, Comcast will detect this and disable your connection (it
happened to me).


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


/etc/resolv.conf and your ISP

2005-05-08 Thread Forrest Aldrich
I can think of a few ways to resolve this, but I thought to ask here.

I have Comcast for my ISP, and of course DHCP changes /etc/resolv.conf
during each update -- lately, they've been screwing things up bigtime,
such that I simply use my own "named" instance.

My question is:  how to reliably keep your own nameserver in
/etc/resolv.conf, and get around the frequent protocol updates that
change/nullify your mods to /etc/resolv.conf.

Perhaps just a regular script that does a diff and patch of it, or
simply copies over the file you want regularly.  Not elegant but it
would work.

I also wonder about creating a dhclient-exit script that would update
certain services automatically when your IP changes.


Thx.

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


RE: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Timothy Radigan
Or, if you don't feel like editing your dhclient.conf, in your
/etc/resolv.conf the first line usually reads:

search thisdomain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.yyy

If you change the first line to read:

domain thisdomain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.yyy

If you change the word search to domain, when the link comes up, dhclient
will not search for upstream domain servers and it won't replace your
hard-coded DNS server list

-- Tim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luke Dean
Sent: Friday, April 22, 2005 11:35 AM
To: Fabian Anklam
Cc: freebsd-questions@freebsd.org
Subject: Re: Prevent DHCP from changing resolv.conf


> I have a minor problem regarding my network configuration,
> specifically that the external interface on my router gets it's IP via
> DHCP from the ISP, so in rc.conf
>
> ifconfig_xl0="DHCP"
>
> is set. This leads to the single entry in resolv.conf that I want to
> be there, namely
>
> nameserver 127.0.0.1
>
> being replaced with my ISP's nameservers, which in return makes
> resolving of LAN IPs or even localhost via the installed BIND
> difficult for the machine. I don't want dhclient to change the
> resolv.conf.
>
> I checked the man pages for resolv.conf, rc.conf and dhclient but
> couldn't find anything there relating to my problem.
>
> Thanks, Fabian

In dhclient.conf, put:
prepend domain-name-servers 127.0.0.1;

This keeps the DNS that DHCP gives you, but it puts your local one first 
so you'll be able to find your local domains.

___
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]"


Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Luke Dean

I have a minor problem regarding my network configuration,
specifically that the external interface on my router gets it's IP via
DHCP from the ISP, so in rc.conf
ifconfig_xl0="DHCP"
is set. This leads to the single entry in resolv.conf that I want to
be there, namely
nameserver 127.0.0.1
being replaced with my ISP's nameservers, which in return makes
resolving of LAN IPs or even localhost via the installed BIND
difficult for the machine. I don't want dhclient to change the
resolv.conf.
I checked the man pages for resolv.conf, rc.conf and dhclient but
couldn't find anything there relating to my problem.
Thanks, Fabian
In dhclient.conf, put:
prepend domain-name-servers 127.0.0.1;
This keeps the DNS that DHCP gives you, but it puts your local one first 
so you'll be able to find your local domains.

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


Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Fabian Anklam
On 4/22/05, Joerg Pulz <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Fri, 22 Apr 2005, Fabian Anklam wrote:
> 
> > Hi All,
> >
> > I have a minor problem regarding my network configuration,
> > specifically that the external interface on my router gets it's IP via
> > DHCP from the ISP, so in rc.conf
> >
> > ifconfig_xl0="DHCP"
> >
> > is set. This leads to the single entry in resolv.conf that I want to
> > be there, namely
> >
> > nameserver 127.0.0.1
> >
> > being replaced with my ISP's nameservers, which in return makes
> > resolving of LAN IPs or even localhost via the installed BIND
> > difficult for the machine. I don't want dhclient to change the
> > resolv.conf.
> >
> > I checked the man pages for resolv.conf, rc.conf and dhclient but
> > couldn't find anything there relating to my problem.
> 
> Hi,
> 
> the file you need to modify is /etc/dhclient.conf.
> for parameters see dhclient.conf(5)
> 
> normally this file is empty, but you can insert global or per interface
> require lines for informations the DHCP server has to submit to the client
> that the IP is acceptable. you can also insert global or per interface
> lines for informations you want to get from the DHCP server if available
> but you don't care if the DHCP server gives you nothing on these
> options and the IP address is accepted.
> 
> hope that helps
> joerg
> 
It does! Looks like i haven't read carefully enough. A

prepend domain-name-servers 127.0.0.1
or
supersede domain-name-servers 127.0.0.1

in dhclient.conf should be all that's needed. I'll test once I am back at home.

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


Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Joerg Pulz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Apr 2005, Fabian Anklam wrote:
Hi All,
I have a minor problem regarding my network configuration,
specifically that the external interface on my router gets it's IP via
DHCP from the ISP, so in rc.conf
ifconfig_xl0="DHCP"
is set. This leads to the single entry in resolv.conf that I want to
be there, namely
nameserver 127.0.0.1
being replaced with my ISP's nameservers, which in return makes
resolving of LAN IPs or even localhost via the installed BIND
difficult for the machine. I don't want dhclient to change the
resolv.conf.
I checked the man pages for resolv.conf, rc.conf and dhclient but
couldn't find anything there relating to my problem.
Hi,
the file you need to modify is /etc/dhclient.conf.
for parameters see dhclient.conf(5)
normally this file is empty, but you can insert global or per interface 
require lines for informations the DHCP server has to submit to the client 
that the IP is acceptable. you can also insert global or per interface 
lines for informations you want to get from the DHCP server if available 
but you don't care if the DHCP server gives you nothing on these 
options and the IP address is accepted.

hope that helps
joerg
- -- 
The beginning is the most important part of the work.
-Plato
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCaMs2SPOsGF+KA+MRAqq4AJ95xhwr4lCKylNi1R2mfBgvtHMkoQCgojT1
SefND9ihSVSrSCKq+0n6wFs=
=3VLp
-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]"


Prevent DHCP from changing resolv.conf

2005-04-22 Thread Fabian Anklam
Hi All,

I have a minor problem regarding my network configuration,
specifically that the external interface on my router gets it's IP via
DHCP from the ISP, so in rc.conf

ifconfig_xl0="DHCP"

is set. This leads to the single entry in resolv.conf that I want to
be there, namely

nameserver 127.0.0.1

being replaced with my ISP's nameservers, which in return makes
resolving of LAN IPs or even localhost via the installed BIND
difficult for the machine. I don't want dhclient to change the
resolv.conf.

I checked the man pages for resolv.conf, rc.conf and dhclient but
couldn't find anything there relating to my problem.

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


Re: what should i have in resolv.conf & hosts

2004-11-20 Thread Tim
Ash wrote:

> Danny Browne wrote:
>
>> Browsers in fluxbox (and gnome when i treid that switching to that) 
>> take forever to fetch webpages (2 mins on a DSL line). but the speed 
>> is normal when using ping or ftp or whatever from terminal/console.
>> are my reslov.conf and hosts file entrys correct?
>>
>> resolv.conf just has:
>>
>> nameserver 192.168.1.254
>>
>> hosts has:
>>
>> ::1 localhost localhost.my.domain
>> 127.0.0.1 localhost localhost.my.domain
>> 192.168.1.3 VaioBSD VaioBSD.eircom.net
>>
>
> [SNIP]
>
> Danny,
>
> I assume that by "browsers" you mean a Mozilla derived browser 
> compiled as a native FreeBSD binary (vs a Linux binary running under 
> emulation). There seems to be a known issue the way Mozilla resolves 
> under FreeBSD. There were some good threads in the news groups and 
> mailing lists on this; You should be able to find them via 
> groups.google.com by searching for something along the lines of 
> "mozilla DNS slow".
>
> There are few couple of reported ways to get around the resolvers 
> issue. I've read that disabling IPv6 in your kernel will help. 
> Installing the Linux native ports (e.g. www/linux-mozillafirebird or 
> www/linux-mozilla) is also reported to work. I haven't tried either of 
> the fore mentioned workarounds, so I don't know if they work or are 
> still applicable.
>
> I route my web traffic through the Squid proxy (available as a FreeBSD 
> port www/squid). As a result, I'm not affected by the resolvers issue 
> since Squid is handling DNS resolution for browsers on my network.
>
> I'm not saying my work around is the best fix; I just happened to need 
> a proxy on my network so it was a convenient fix way for me to deal 
> with this issue.
>
> -Ash
>
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "[EMAIL PROTECTED]"
>
>

I'm running 5.3 and have IPv6 in my kernel, and I resolv just fine, as 
long as my DNS server isn't inside my local network. In resolv.conf 
should be:

nameserver a.b.c.d

where a.b.c.d is the ip address for the DNS server provided by your ISP. 
If the IP address being provided by is a 192 address, you're bound to 
have problems. In other words, if your ISP has given you DNS servers to 
use, use them. If not, find one.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: what should i have in resolv.conf & hosts

2004-11-20 Thread Ash
Danny Browne wrote:
Browsers in fluxbox (and gnome when i treid that switching to that) take 
forever to fetch webpages (2 mins on a DSL line). but the speed is normal when 
using ping or ftp or whatever from terminal/console.
are my reslov.conf and hosts file entrys correct?
resolv.conf just has:
nameserver 192.168.1.254
hosts has:
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
192.168.1.3 VaioBSD VaioBSD.eircom.net
[SNIP]
Danny,
I assume that by "browsers" you mean a Mozilla derived browser compiled 
as a native FreeBSD binary (vs a Linux binary running under emulation). 
There seems to be a known issue the way Mozilla resolves under FreeBSD. 
There were some good threads in the news groups and mailing lists on 
this; You should be able to find them via groups.google.com by searching 
for something along the lines of "mozilla DNS slow".

There are few couple of reported ways to get around the resolvers issue. 
I've read that disabling IPv6 in your kernel will help. Installing the 
Linux native ports (e.g. www/linux-mozillafirebird or www/linux-mozilla) 
is also reported to work. I haven't tried either of the fore mentioned 
workarounds, so I don't know if they work or are still applicable.

I route my web traffic through the Squid proxy (available as a FreeBSD 
port www/squid). As a result, I'm not affected by the resolvers issue 
since Squid is handling DNS resolution for browsers on my network.

I'm not saying my work around is the best fix; I just happened to need a 
proxy on my network so it was a convenient fix way for me to deal with 
this issue.

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


what should i have in resolv.conf & hosts

2004-11-20 Thread Danny Browne

Browsers in fluxbox (and gnome when i treid that switching to that) take 
forever to fetch webpages (2 mins on a DSL line). but the speed is normal when 
using ping or ftp or whatever from terminal/console.
are my reslov.conf and hosts file entrys correct?

resolv.conf just has:

nameserver 192.168.1.254

hosts has:

::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
192.168.1.3 VaioBSD VaioBSD.eircom.net


Danny Browne



_
Sign up for eircom broadband now and get a free two month trial.*
Phone 1850 73 00 73 or visit http://home.eircom.net/broadbandoffer


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


  1   2   >