My /etc/resolv.conf gets rewritten periodically

  • Hi,
    I have a strange issue: my /etc/resolv.conf file gets rewritten periodically and I found a


    Code
    nameserver 127.0.0.1

    in it, which is wrong.
    I reconfigured my network card using OMV web interface, with static IP andh DNS settings, no change.
    I did dpkg-reconfigure resolvconf as I read on this forum, no luck.
    The strangest thing is that the domain search configured in the web configuration is mantained, but the nameserver line gets changed.
    I found a file /etc/resolvconf/resolv.conf.d/original which has the wrong line in it and I can change that, but I wonder which is the correct procedure to follow.
    I scanned the openmediavault config.xml file and the dnsnameserver is correctly set as 192.168.3.1
    I don't know when this problem started because a while ago I installed PiHole (which is now disabled) and so 127.0.0.1 was a working configuration. Now that I don't want to use PiHole for the time being I found this weird behaviour.

    • Offizieller Beitrag

    I don't know when this problem started because a while ago I installed PiHole (which is now disabled) and so 127.0.0.1 was a working configuration. Now that I don't want to use PiHole for the time being I found this weird behaviour.

    pihole installs resolvconf which conflicts with systemd-resolved. So, remove resolvconf - apt-get purge resolvconf

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Is it safe to remove resolvconf if I plan to use PiHole again?

    The pihole installer and updater both make sure it is installed. So, you need to run pihole in docker if you want to avoid this.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I tried your suggestion @ryecoaaron and tried the docker way. Then I had another issue because I already have a bridged interface on my OMV used by qemu and it seemed to me I was unable to use macvlan on docker...
    Then I read that I can install pihole on the system, modify the

    Code
    /etc/dnsmasq.d/01-pihole.conf


    and make pihole forward queries for my internal network to my router adding this line:



    Code
    server=/my.domain/my.router.ip.address

    And with this I'm ok. Pihole does his job and I get lan name resloving from my router.


    I also saw a configuration section on the pihole web interface called "Conditional Forwarding"
    which seems to do the exact same thing.


    Hope that this helps someone else

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!