On Sun, Aug 06, 2023 at 07:06:01AM -0400, Timothy M Butterworth wrote:
> On Sun, Aug 6, 2023 at 6:13 AM Jon Smart <j...@daydaylive.us> wrote:
> 
> > 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
> >
> The file /etc.resolv.conf is just a soft link.

Not always, so please make sure it is /before/ you follow the
steps below.

> You need to:
> 
> 1: Delete /etc/resolv.conf - rm /etc/resolv.conf
> 2: Create a new /etc/resolv.conf file: touch /etc/resolv.conf
> 3: Configure you nameservers
> 4: Make the file immutable: chattr +i /etc/resolv.conf

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to