Docker Pi-hole port 53 conflict

  • Hi. I moved from OMV 4 to OMV 5 recently and when I try to start the docker-compose file that worked for Pi-hole on OMV 4, I now get an error regarding the tcp port 53 used for DNS. The port is already in use by systemd-resolved. When I stop the service I can start the Pi-hole container, but whenever I restart the system, Pi-hole can not start. I tried disabling the systemd-resolv service, but then I dont get DNS resolutions anymore on the system. So what did change with OMV 5 and what can I do to free port 53?

    • Offizieller Beitrag

    I tried disabling the systemd-resolv service, but then I dont get DNS resolutions anymore on the system.

    You don't want to disable the service. Edit /etc/systemd/resolved.conf and change the Cache and DNSStubListener lines to no.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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

    Do you know why this changed with OMV 5?

    This isn't an OMV change. It is a Debian change. Newer version of Debian means newer version of systemd and systemd-resolved is a newer feature.

  • Ah ok, I see. And would it be possible for OMV to change the settings of resolved on installation? Or add an option to the webinterface... Because with blocked DNS port there is no possibility to run any DNS server and I think this will be an issue for more people than just me ..

    • Offizieller Beitrag

    And would it be possible for OMV to change the settings of resolved on installation? Or add an option to the webinterface... Because with blocked DNS port there is no possibility to run any DNS server and I think this will be an issue for more people than just me ..

    There is no option to disable this in the web interface. Most people don't run a dns server on their OMV install. And you could use macvlan so that the pihole container would use its own IP address avoiding this problem. For the few people that have this issue, I doubt Volker would add it but you can always ask - https://github.com/OpenMediaVault/openmediavault/issues


    Otherwise, it is a two line cut&paste to fix it:
    sudo sed -i "s/^#Cache=yes/Cache=no/g" /etc/systemd/resolved.conf
    sudo sed -i "s/^#DNSStubListener=yes/DNSStubListener=no/g" /etc/systemd/resolved.conf


    then either reboot or restart systemd-resolved : systemctl restart systemd-resolved

  • There is no option to disable this in the web interface. Most people don't run a dns server on their OMV install. And you could use macvlan so that the pihole container would use its own IP address avoiding this problem. For the few people that have this issue, I doubt Volker would add it but you can always ask - https://github.com/OpenMediaVault/openmediavault/issues


    Otherwise, it is a two line cut&paste to fix it:
    sudo sed -i "s/^#Cache=yes/Cache=no/g" /etc/systemd/resolved.conf
    sudo sed -i "s/^#DNSStubListener=yes/DNSStubListener=no/g" /etc/systemd/resolved.conf


    then either reboot or restart systemd-resolved : systemctl restart systemd-resolved

    Hallo ich, wärme den Beitrag mit einer Frage auf.


    Das Problem mit dem Port 53 hatte ich auch und die im Zitat vorgeschlagene Lösung schaffte Abhilfe. Das möchte ich nun wieder rückgängig machen. Da ich den Befehl nicht komplett nachvollziehen kann, benötige ich hier Unterstützung.


    Gruß toolted

    • Offizieller Beitrag

    Hallo ich, wärme den Beitrag mit einer Frage auf.


    Das Problem mit dem Port 53 hatte ich auch und die im Zitat vorgeschlagene Lösung schaffte Abhilfe. Das möchte ich nun wieder rückgängig machen. Da ich den Befehl nicht komplett nachvollziehen kann, benötige ich hier Unterstützung.


    Gruß toolted

    Why do you want to undo it?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

  • There is no option to disable this in the web interface. Most people don't run a dns server on their OMV install. And you could use macvlan so that the pihole container would use its own IP address avoiding this problem. For the few people that have this issue, I doubt Volker would add it but you can always ask - https://github.com/OpenMediaVault/openmediavault/issues


    Otherwise, it is a two line cut&paste to fix it:
    sudo sed -i "s/^#Cache=yes/Cache=no/g" /etc/systemd/resolved.conf
    sudo sed -i "s/^#DNSStubListener=yes/DNSStubListener=no/g" /etc/systemd/resolved.conf


    then either reboot or restart systemd-resolved : systemctl restart systemd-resolved

    Nailed it. Not only posted the fix but nailed the "just copy-pate this" side. Thank you.

Jetzt mitmachen!

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