dns: error: can't bind socket: permission denied.

Hi, I am testing your build from scratch on a synology, and here is what I’m seeing. I’m a bit confused because from your most recent changes, it sounds like running as a non-root-user shouldn’t be a problem, but clearly it is. Can you help?

docker run -it --rm --name dns -p 53:53/udp -e VERBOSITY=5 -e VERBOSITY_DETAILS=4 -e BLOCK_MALICIOUS=off qmcgaw/cloudflare-dns-server
Unable to find image 'qmcgaw/cloudflare-dns-server:latest' locally
latest: Pulling from qmcgaw/cloudflare-dns-server
4fe2ade4980c: Already exists 
0cd970152cc6: Pull complete 
0cd8ed03c739: Pull complete 
857cf1d27e1d: Pull complete 
ba942c51bb57: Pull complete 
013c5f68402b: Pull complete 
0b624eaa3c30: Pull complete 
283041182f9d: Pull complete 
970357afc184: Pull complete 
Digest: sha256:88923bee0befbb9fadd00a67923dd3f9999196d600c0fa6acc8147b28c3ffddd
Status: Downloaded newer image for qmcgaw/cloudflare-dns-server:latest
 =========================================
 =========================================
 === CLOUDFLARE DNS OVER TLS CONTAINER ===
 =========================================
 =========================================
 == by github.com/qdm12 - Quentin McGaw ==

Running as nonrootuser
Unbound version: 1.7.3
Unbound listening UDP port: 53
Verbosity level set to 5 on 5
Verbosity details level set to 4 on 4
Malicious hostnames and ips blocking is off
[1542342706] unbound[27:0] notice: Start of unbound 1.7.3.
[1542342706] unbound[27:0] debug: creating udp4 socket 0.0.0.0 53
[1542342706] unbound[27:0] error: can't bind socket: Permission denied for 0.0.0.0 port 53 (len 16)
[1542342706] unbound[27:0] fatal error: could not open ports

 =========================================
 Unbound exit with status 1
 =========================================

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

changing the port on the container to 8053 as above fixed