Skip to content

Instantly share code, notes, and snippets.

@mister2d
Created March 23, 2020 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mister2d/3e4b37e60823f9071b5d4a22150c1d55 to your computer and use it in GitHub Desktop.
Save mister2d/3e4b37e60823f9071b5d4a22150c1d55 to your computer and use it in GitHub Desktop.
Disable systemd dns listener
I’m using a simple dnsmasq.
# Enable forward lookup of the 'consul' domain:
server=/consul/127.0.0.1#8600
# Accept DNS queries only from hosts whose address is on a local subnet.
local-service
If systemd resolver is running you’ll hit an issue since it’s already binding 127.0.0.1:53.
Add this to /etc/systemd/resolved.conf
DNSStubListener=no
Then use the dns_servers directive to point your containers to dnsmasq.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment