TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.51k stars 431 forks source link

Completely not working #1103

Open fakhrulhilal opened 2 weeks ago

fakhrulhilal commented 2 weeks ago

I have just install the dns server using docker compose file as follow:

dns-server:
  image: technitium/dns-server
  network_mode: bridge
  ports:
    - 53:53
    - 8053:8053/tcp
    - 44353:44353/tcp
  environment:
    - DNS_SERVER_DOMAIN=my.domain
    - DNS_SERVER_WEB_SERVICE_HTTP_PORT=8053
    - DNS_SERVER_WEB_SERVICE_HTTPS_PORT=44353
    - DNS_SERVER_WEB_SERVICE_USE_SELF_SIGNED_CERT=false
    - DNS_SERVER_FORWARDERS=8.8.8.8,1.1.1.1
    - DNS_SERVER_FORWARDER_PROTOCOL=Https
    - DNS_SERVER_LOG_USING_LOCAL_TIME=true
    - TZ=${TZ}
  volumes:
    - dns_config:/etc/dns
  restart: unless-stopped

But it doesn't resolve any domain when tested using host container.

technitium log

I dont' see any suspicious error in log as well

[2024-11-11 03:43:51 Local] Logging started.
[2024-11-11 03:43:51 Local] [172.17.0.1:44122] [admin] Log file was deleted: 2024-11-11
[2024-11-11 03:45:21 Local] [172.17.0.1:55834] Check for update was done {updateAvailable: False; updateVersion: 13.1.1; updateTitle: New Update (v13.1.1) Available!; updateMessage: Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing this update to know if there are any breaking changes.; instructionsLink: https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html; changeLogLink: https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md;}
[2024-11-11 03:47:36 Local] [172.17.0.1:43902] Check for update was done {updateAvailable: False; updateVersion: 13.1.1; updateTitle: New Update (v13.1.1) Available!; updateMessage: Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing this update to know if there are any breaking changes.; instructionsLink: https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html; changeLogLink: https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md;}
[2024-11-11 03:48:13 Local] DNS Server auth config file was saved: /etc/dns/auth.config
[2024-11-11 03:49:18 Local] [172.17.0.1:42928] Check for update was done {updateAvailable: False; updateVersion: 13.1.1; updateTitle: New Update (v13.1.1) Available!; updateMessage: Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing this update to know if there are any breaking changes.; instructionsLink: https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html; changeLogLink: https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md;}
[2024-11-11 03:56:22 Local] [172.17.0.1:57212] Check for update was done {updateAvailable: False; updateVersion: 13.1.1; updateTitle: New Update (v13.1.1) Available!; updateMessage: Follow the instructions from the link below to update the DNS server to the latest version. Read the change logs before installing this update to know if there are any breaking changes.; instructionsLink: https://blog.technitium.com/2017/11/running-dns-server-on-ubuntu-linux.html; changeLogLink: https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md;}

I have enabled recursion as well. Basically, that's the only setting I change after installing. I haven't setup any domain yet. Could you tell me what is missing from my setup?

ShreyasZare commented 2 weeks ago

Thanks for the details. The "connection refused" error just means that the DNS server is not listening on "127.0.0.1:53" end point. I am not sure what could be the reason for this issue. You can try running the container in host network mode instead and see if that works.

fakhrulhilal commented 2 weeks ago

Thanks for the details. The "connection refused" error just means that the DNS server is not listening on "127.0.0.1:53" end point. I am not sure what could be the reason for this issue. You can try running the container in host network mode instead and see if that works.

It works now. Not sure why it has to be network_mode: host.