resolve.conf overwritten woes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

resolve.conf overwritten woes

jungle Boogie
Hi All,


 From this page:
https://www.openbsd.org/faq/faq6.html#Setup

Once the interface is configured, the /etc/resolv.conf file will be
overwritten.
You can customize the resolver configuration by using settings in
dhclient.conf(5)
and using resolv.conf.tail(5). To prevent the DHCP server from
overriding the
DNS server you configured in /etc/resolv.conf.tail, add ignore
domain-name-servers;
to your /etc/dhclient.conf.

$ cat /etc/dhclient.conf
 
 

send host-name "puffer.in.example.net";
ignore domain-name-servers;

$ cat /etc/resolv.conf.tail
 
 

search in.example.net
nameserver 192.168.0.17
lookup file bind

$ cat /etc/resolv.conf
 
 

$

$ cat /etc/hosts
 
 

127.0.0.1       localhost puffer.in.example.net
::1             localhost


What am I doing wrong? I just want a search domain and a couple NS is
resolv.conf

Thanks!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

Raf Czlonka-2
On Sat, Aug 12, 2017 at 07:12:52AM BST, jungle boogie wrote:

> Hi All,
>
> From this page:
> https://www.openbsd.org/faq/faq6.html#Setup
>
> Once the interface is configured, the /etc/resolv.conf file will be
> overwritten.
> You can customize the resolver configuration by using settings in
> dhclient.conf(5)
> and using resolv.conf.tail(5). To prevent the DHCP server from overriding
> the
> DNS server you configured in /etc/resolv.conf.tail, add ignore
> domain-name-servers;
> to your /etc/dhclient.conf.
>
> $ cat /etc/dhclient.conf
>
> send host-name "puffer.in.example.net";
> ignore domain-name-servers;
>
> $ cat /etc/resolv.conf.tail
>
> search in.example.net
> nameserver 192.168.0.17
> lookup file bind
>
> $ cat /etc/resolv.conf
>
> $
>
> $ cat /etc/hosts
>
> 127.0.0.1       localhost puffer.in.example.net
> ::1             localhost
>
> What am I doing wrong? I just want a search domain and a couple NS is
> resolv.conf
>
> Thanks!
>

Hi,

I don't think there's anything you're doing wrong - I've tested it
myself just now and the option doesn't seem to be doing what it is
supposed to, at least as described in the FAQ.

In order to achieve the same, I simply use 'supersede', i.e.:

        send host-name "host";
        supersede domain-name-servers 127.0.0.1;

Regards,

Raf

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

jungle Boogie
Thus said Raf Czlonka on Sat, 12 Aug 2017 09:53:35 +0100

>> What am I doing wrong? I just want a search domain and a couple NS is
>> resolv.conf
>>
>> Thanks!
>>
>
> Hi,
>
> I don't think there's anything you're doing wrong - I've tested it
> myself just now and the option doesn't seem to be doing what it is
> supposed to, at least as described in the FAQ.
>

I forgot to add that I'm running openbsd -current snapshot from
OpenBSD 6.1-current (GENERIC.MP) #1: Fri Aug 11 21:26:07 MDT 2017

> In order to achieve the same, I simply use 'supersede', i.e.:
>
> send host-name "host";
> supersede domain-name-servers 127.0.0.1;
>

That didn't work for me. I have this working by removing the ignore
option from /etc/dhclient.conf and now my /etc/resolv.conf looks like this:

$ cat /etc/resolv.conf
 
 

# Generated by wpi0 dhclient
nameserver 68.105.28.11
nameserver 68.105.29.11
nameserver 68.105.28.12
lookup file bind
search in.example.net
nameserver 192.168.0.17

This will work kind of work for the time being.

> Regards,
>
> Raf
>




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

Theo Buehler-3
In reply to this post by jungle Boogie
On Fri, Aug 11, 2017 at 11:12:52PM -0700, jungle boogie wrote:
> Hi All,
>
>
> From this page:
> https://www.openbsd.org/faq/faq6.html#Setup
>

krw pointed out that the documentation got this pretty much entirely
wrong and provided a fix. it will be online shortly.

sorry for the inconvenience.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

jungle Boogie
I think I saw it and there was a typo with resolveor section.

Sent from my iPhone 7.1
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

Theo Buehler-3
On Sat, Aug 12, 2017 at 07:49:22PM -0700, jungle Boogie wrote:
> I think I saw it and there was a typo with resolveor section.

thanks, but unfortunately i have no idea what you mean. could you please
be more specific?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolve.conf overwritten woes

jungle Boogie
Thus said Theo Buehler on Sat, 12 Aug 2017 22:56:05 -0400
> On Sat, Aug 12, 2017 at 07:49:22PM -0700, jungle Boogie wrote:
>> I think I saw it and there was a typo with resolveor section.
>
> thanks, but unfortunately i have no idea what you mean. could you please
> be more specific?
>

Well maybe this is legitimate:
provides the domain-name, domain-searchor or domain-name-servers options.



Loading...