[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/resolv.conf changes every booting time



It's a VPS provided by a local ISP. The VPS has a static IPv4.
Do you know how to know if /etc/resolv.conf is modified by dhcp?

Thanks.


>
> Hi Jon,
>
>> I have removed the default systemd-resolved local dns service following
>> the link below,
>>
>> https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu
>>
>> And I have unbound installed and enabled as local DNS server.
>>
>> But every time I reboot the server, the configuration file
>> /etc/resolv.conf changes to a default one. So every time I have to
>> update
>> its content to:
>>
>> nameserver 127.0.0.1
>>
>> (points to unbound)
>>
>> How to stop the auto-changes to /etc/resolv.conf after rebooting?
>
> In case you get the configuration overwritten by DHCP you can avoid that
> by the following lines in /etc/dhcp/dhclient.conf.
>
> interface "bond0" {
> supersede domain-name-servers 127.0.0.1;
> }
>
> Just replace the interface name with yours.
>
> Kind regards,
> Christoph
> --
> Ist die Katze gesund
> schmeckt sie dem Hund.
>



Reply to: