Not receiving UDP traffic on port 53

Hey, I’m trying to host a DNS server, but it does not receive any UDP traffic, and instead fly’s DNS server takes over the request.

I am:

  • using a dedicated ipv4 address
  • binding to fly-global-services
  • using the same internal/external ports in my fly.toml configuration

In my fly.toml I have:

[[services]]
internal_port = 53
protocol = "udp"

[[services.ports]]
port = 53

[[services]]
internal_port = 53
protocol = "tcp"

[[services.ports]]
port = 53

I tried using port 5353 and that worked correctly, so it’s not an issue with the code or the config file or the container.

Never mind, adding these to my Dockerfile fixed it:

EXPOSE 53/udp
EXPOSE 53/tcp