dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread 联通集团联通云数据有限公司本部
Hi,

My OS is Centos7. I add a bash script dns.sh in /etc/dhcp/dhclient-exit-hooks.d 
. The script content is

#!/bin/bash
echo “nameserver 1.1.1.1” >> /etc/resolv.conf

I want to append a nameserver in /etc/resove.conf.
However, when I restart network. /etc/resove.conf not changed.
/etc/resove.conf.save append this line.
Why happens that? How can I append a nameserver in /etc/resove.conf?

Zhengyu
Best Wishes
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
this email in error please notify us immediately by e-mail. Please reply to 
hqs-s...@chinaunicom.cn ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Changes BIND 9.15+ source distribution (gz -> xz, and SHA1 deprecation)

2019-12-19 Thread Ondřej Surý
Hi,

the BIND 9 development team has decided to change the compression method for 
BIND 9.15.7, and also for the next BIND 9.16.0 release to widely available 
**xz** compression algorithm.  Therefore, the tarball extension has changed 
from https://downloads.isc.org/isc/bind9/9.15.7/bind-9.15.7.tar.gz to 
https://downloads.isc.org/isc/bind9/9.15.7/bind-9.15.7.tar.xz

xz offers considerable savings in terms of disk space and thus network traffic 
and the tool is available in the base system for most if not all Linux and BSD 
distributions.

The previous versions of BIND 9 (9.11 and 9.14) are still distributed 
compressed with gzip.

The other change we will introduce early next year (timed with BIND 9.16.0 
release) is the deprecation of SHA1 checksums.  The MD based algorithms are no 
longer collision resistant enough and henceforth the SHA1 based checksums no 
longer bear any real value.

Ondrej
--
Ondřej Surý
ond...@isc.org

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread Reindl Harald


Am 19.12.19 um 10:01 schrieb Zhengyu Pan:
> My OS is Centos7. I add a bash script dns.sh in
> /etc/dhcp/dhclient-exit-hooks.d . The script content is
> 
> #!/bin/bash
> echo“nameserver1.1.1.1”>>/etc/resolv.conf
> 
> I want to append a nameserver in /etc/resove.conf.
> However, when I restart network. /etc/resove.conf not changed.
> /etc/resove.conf.save append this line. 
> Why happens that? How can I append a nameserver in /etc/resove.conf?

not a named qurstion at all, however

becasue something overwrote /etc/resolv.conf after your script which
maybe means your script runs way too early

chattr +i /etc/resove.conf under normal conditions

chattr -i /etc/resove.conf at the start of your script
chattr +i /etc/resove.conf at the end of your script

https://www.tecmint.com/chattr-command-examples/

this is a supported way to prevent resolv.conf overwritten by whatever
stuff running on the system, be it dhclient, networkmanager or another
smartass stuff which lives in a authistic world pretend to know what my
nameservers are
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread 联通集团联通云数据有限公司本部
Sorry. I sent wrong mailing group.
chattr not worked.  It prompted:
Shutting down inteface eth0: chattr:Operation not permitted while setting flags 
on /etc/resolv.conf.

> 2019年12月19日 下午5:28,Reindl Harald  写道:
>
>
>
> Am 19.12.19 um 10:01 schrieb Zhengyu Pan:
>> My OS is Centos7. I add a bash script dns.sh in
>> /etc/dhcp/dhclient-exit-hooks.d . The script content is
>>
>> #!/bin/bash
>> echo“nameserver1.1.1.1”>>/etc/resolv.conf
>>
>> I want to append a nameserver in /etc/resove.conf.
>> However, when I restart network. /etc/resove.conf not changed.
>> /etc/resove.conf.save append this line.
>> Why happens that? How can I append a nameserver in /etc/resove.conf?
>
> not a named qurstion at all, however
>
> becasue something overwrote /etc/resolv.conf after your script which
> maybe means your script runs way too early
>
> chattr +i /etc/resove.conf under normal conditions
>
> chattr -i /etc/resove.conf at the start of your script
> chattr +i /etc/resove.conf at the end of your script
>
> https://www.tecmint.com/chattr-command-examples/
>
> this is a supported way to prevent resolv.conf overwritten by whatever
> stuff running on the system, be it dhclient, networkmanager or another
> smartass stuff which lives in a authistic world pretend to know what my
> nameservers are
> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
> from this list
>
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users

如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
this email in error please notify us immediately by e-mail. Please reply to 
hqs-s...@chinaunicom.cn ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


RE: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread Philippe Maechler
Hi Zhengyu Pan

 

Have you tried to put this nameserver address in dhclient.conf? 

 

>From man dhclient.conf

 append { [option declaration] [, ... option declaration] }

 If for some set of options the client should first use the values

 supplied by the server, if any, and then use values you supply,

 these values can be defined in the append statement.  The append

 statement can only be used for options which allow more than one

 value to be given.  This restriction is not enforced - if you

 ignore it, the behaviour will be unpredictable.

 

I haven’t use the ap- or prepend options, but the supersede option work like a 
charm (at least on FreeBSD)

 

/BR

Philippe

 

From: bind-users  On Behalf Of Zhengyu 
Pan(???)
Sent: Thursday, December 19, 2019 10:01 AM
To: bind-users@lists.isc.org
Subject: dhclient hook not overwritten /etc/resolv.conf

 

Hi,





My OS is Centos7. I add a bash script dns.sh in /etc/dhcp/dhclient-exit-hooks.d 
. The script content is





#!/bin/bash

echo “nameserver 1.1.1.1” >> /etc/resolv.conf 





I want to append a nameserver in /etc/resove.conf.

However, when I restart network. /etc/resove.conf not changed.

/etc/resove.conf.save append this line. 

Why happens that? How can I append a nameserver in /etc/resove.conf?





Zhengyu

Best Wishes

如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 hqs-s...@chinaunicom.cn 
 
,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received this email in error 
please notify us immediately by e-mail. Please reply to hqs-s...@chinaunicom.cn 
  ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our. 

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread Reindl Harald


Am 19.12.19 um 10:58 schrieb Zhengyu Pan:
> Sorry. I sent wrong mailing group.
> chattr not worked.  It prompted:
> Shutting down inteface eth0: chattr:Operation not permitted while setting 
> flags on /etc/resolv.conf.

the opposite is true

it proves *that* it worked but waht can#t wrk i when you for whatever
reason need or believe to ned the dynamic nameservers

but that don't make sense anyways

having dozens of namservers in /etc/resolv.conf with your wished ones at
the bottom is useless because it won't be questioned at all as long the
first in teh list are responding

>> 2019年12月19日 下午5:28,Reindl Harald  写道:
>> Am 19.12.19 um 10:01 schrieb Zhengyu Pan:
>>> My OS is Centos7. I add a bash script dns.sh in
>>> /etc/dhcp/dhclient-exit-hooks.d . The script content is
>>>
>>> #!/bin/bash
>>> echo“nameserver1.1.1.1”>>/etc/resolv.conf
>>>
>>> I want to append a nameserver in /etc/resove.conf.
>>> However, when I restart network. /etc/resove.conf not changed.
>>> /etc/resove.conf.save append this line.
>>> Why happens that? How can I append a nameserver in /etc/resove.conf?
>>
>> not a named qurstion at all, however
>>
>> becasue something overwrote /etc/resolv.conf after your script which
>> maybe means your script runs way too early
>>
>> chattr +i /etc/resove.conf under normal conditions
>>
>> chattr -i /etc/resove.conf at the start of your script
>> chattr +i /etc/resove.conf at the end of your script
>>
>> https://www.tecmint.com/chattr-command-examples/
>>
>> this is a supported way to prevent resolv.conf overwritten by whatever
>> stuff running on the system, be it dhclient, networkmanager or another
>> smartass stuff which lives in a authistic world pretend to know what my
>> nameservers are
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread 联通集团联通云数据有限公司本部
Thanks.
I have tried append prepend and supersede option. They are ok for ipv4 name 
server. But It doesn’t work for ipv6 name server.

Zhengyu

2019年12月19日 下午6:16,Philippe Maechler 
mailto:pmaechler...@glattnet.ch>> 写道:

Hi Zhengyu Pan

Have you tried to put this nameserver address in dhclient.conf?

From man dhclient.conf
 append { [option declaration] [, ... option declaration] }
 If for some set of options the client should first use the values
 supplied by the server, if any, and then use values you supply,
 these values can be defined in the append statement.  The append
 statement can only be used for options which allow more than one
 value to be given.  This restriction is not enforced - if you
 ignore it, the behaviour will be unpredictable.

I haven’t use the ap- or prepend options, but the supersede option work like a 
charm (at least on FreeBSD)

/BR
Philippe

From: bind-users 
mailto:bind-users-boun...@lists.isc.org>> On 
Behalf Of Zhengyu Pan(???)
Sent: Thursday, December 19, 2019 10:01 AM
To: bind-users@lists.isc.org
Subject: dhclient hook not overwritten /etc/resolv.conf

Hi,


My OS is Centos7. I add a bash script dns.sh in /etc/dhcp/dhclient-exit-hooks.d 
. The script content is


#!/bin/bash
echo “nameserver 1.1.1.1” >> /etc/resolv.conf


I want to append a nameserver in /etc/resove.conf.
However, when I restart network. /etc/resove.conf not changed.
/etc/resove.conf.save append this line.
Why happens that? How can I append a nameserver in /etc/resove.conf?


Zhengyu
Best Wishes
如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。
 If you have received this email in error please notify us immediately by 
e-mail. Please reply to hqs-s...@chinaunicom.cn 
,you can unsubscribe from this mail. We will immediately remove your 
information from send catalogue of our.

如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
this email in error please notify us immediately by e-mail. Please reply to 
hqs-s...@chinaunicom.cn ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread 联通集团联通云数据有限公司本部
I  only want to prepend only a IPv6 nameserver. Other ns are added by users.

Zhengyu
Thanks.

> 2019年12月19日 下午6:32,Reindl Harald  写道:
>
>
>
> Am 19.12.19 um 10:58 schrieb Zhengyu Pan:
>> Sorry. I sent wrong mailing group.
>> chattr not worked.  It prompted:
>> Shutting down inteface eth0: chattr:Operation not permitted while setting 
>> flags on /etc/resolv.conf.
>
> the opposite is true
>
> it proves *that* it worked but waht can#t wrk i when you for whatever
> reason need or believe to ned the dynamic nameservers
>
> but that don't make sense anyways
>
> having dozens of namservers in /etc/resolv.conf with your wished ones at
> the bottom is useless because it won't be questioned at all as long the
> first in teh list are responding
>
>>> 2019年12月19日 下午5:28,Reindl Harald  写道:
>>> Am 19.12.19 um 10:01 schrieb Zhengyu Pan:
 My OS is Centos7. I add a bash script dns.sh in
 /etc/dhcp/dhclient-exit-hooks.d . The script content is

 #!/bin/bash
 echo“nameserver1.1.1.1”>>/etc/resolv.conf

 I want to append a nameserver in /etc/resove.conf.
 However, when I restart network. /etc/resove.conf not changed.
 /etc/resove.conf.save append this line.
 Why happens that? How can I append a nameserver in /etc/resove.conf?
>>>
>>> not a named qurstion at all, however
>>>
>>> becasue something overwrote /etc/resolv.conf after your script which
>>> maybe means your script runs way too early
>>>
>>> chattr +i /etc/resove.conf under normal conditions
>>>
>>> chattr -i /etc/resove.conf at the start of your script
>>> chattr +i /etc/resove.conf at the end of your script
>>>
>>> https://www.tecmint.com/chattr-command-examples/
>>>
>>> this is a supported way to prevent resolv.conf overwritten by whatever
>>> stuff running on the system, be it dhclient, networkmanager or another
>>> smartass stuff which lives in a authistic world pretend to know what my
>>> nameservers are
> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
> from this list
>
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users

如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
this email in error please notify us immediately by e-mail. Please reply to 
hqs-s...@chinaunicom.cn ,you can unsubscribe from this mail. We will 
immediately remove your information from send catalogue of our.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: dhclient hook not overwritten /etc/resolv.conf

2019-12-19 Thread Ondřej Surý
You need to ask on your distro user support forum and not here.  This topic is 
beyond
the subject of this list as it could include all kinds of integrations that 
your distribution
provides.

This is not a bind-users topic.

Ondrej
--
Ondřej Surý
ond...@isc.org

> On 19 Dec 2019, at 11:41, Zhengyu Pan(联通集团联通云数据有限公司本部) 
>  wrote:
> 
> I  only want to prepend only a IPv6 nameserver. Other ns are added by users.
> 
> Zhengyu
> Thanks.
> 
>> 2019年12月19日 下午6:32,Reindl Harald  写道:
>> 
>> 
>> 
>> Am 19.12.19 um 10:58 schrieb Zhengyu Pan:
>>> Sorry. I sent wrong mailing group.
>>> chattr not worked.  It prompted:
>>> Shutting down inteface eth0: chattr:Operation not permitted while setting 
>>> flags on /etc/resolv.conf.
>> 
>> the opposite is true
>> 
>> it proves *that* it worked but waht can#t wrk i when you for whatever
>> reason need or believe to ned the dynamic nameservers
>> 
>> but that don't make sense anyways
>> 
>> having dozens of namservers in /etc/resolv.conf with your wished ones at
>> the bottom is useless because it won't be questioned at all as long the
>> first in teh list are responding
>> 
 2019年12月19日 下午5:28,Reindl Harald  写道:
 Am 19.12.19 um 10:01 schrieb Zhengyu Pan:
> My OS is Centos7. I add a bash script dns.sh in
> /etc/dhcp/dhclient-exit-hooks.d . The script content is
> 
> #!/bin/bash
> echo“nameserver1.1.1.1”>>/etc/resolv.conf
> 
> I want to append a nameserver in /etc/resove.conf.
> However, when I restart network. /etc/resove.conf not changed.
> /etc/resove.conf.save append this line.
> Why happens that? How can I append a nameserver in /etc/resove.conf?
 
 not a named qurstion at all, however
 
 becasue something overwrote /etc/resolv.conf after your script which
 maybe means your script runs way too early
 
 chattr +i /etc/resove.conf under normal conditions
 
 chattr -i /etc/resove.conf at the start of your script
 chattr +i /etc/resove.conf at the end of your script
 
 https://www.tecmint.com/chattr-command-examples/
 
 this is a supported way to prevent resolv.conf overwritten by whatever
 stuff running on the system, be it dhclient, networkmanager or another
 smartass stuff which lives in a authistic world pretend to know what my
 nameservers are
>> ___
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to 
>> unsubscribe from this list
>> 
>> bind-users mailing list
>> bind-users@lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users
> 
> 如果您错误接收了该邮件,请通过电子邮件立即通知我们。请回复邮件到 
> hqs-s...@chinaunicom.cn,即可以退订此邮件。我们将立即将您的信息从我们的发送目录中删除。 If you have received 
> this email in error please notify us immediately by e-mail. Please reply to 
> hqs-s...@chinaunicom.cn ,you can unsubscribe from this mail. We will 
> immediately remove your information from send catalogue of our.
> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
> from this list
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users