Sign inSign up

leros321/dnsmasq

By leros321

•Updated about 8 years ago

docker-dnsmasq (from https://hub.docker.com/r/andyshinn/dnsmasq/ )

Image
0

67

leros321/dnsmasq repository overview

It's a dnsmasq Docker image. It is only 6 MB in size. It is just an ENTRYPOINT to the dnsmasq binary. Usage

dnsmasq 2.75 based on Alpine 3.3

dnsmasq requires NET_ADMIN capabilities to run correctly. Start it with something like docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN leros321/dnsmasq:2.75 or if port 53 is occuied than: docker run -p 127.0.0.1:53:53/tcp -p 127.0.0.1:53:53/udp --cap-add=NET_ADMIN leros321/dnsmasq:2.75

The configuration is all handled on the command line (no wrapper scripts here). The ENTRYPOINT is dnsmasq -k to keep it running in the foreground. If you wanted to send requests for another domain (e.g. .sk) you can forward the requests upstream using something like docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN leros321/dnsmasq:2.75 -S /.sk/8.8.4.4. This will send a request for *.sk to 8.8.4.4

As this is a very barebones entrypoint with just enough to run in the foreground, there is no logging enabled by default. To send logging to stdout you can add --log-facility=- as an option or -q to log DNS-queries e.g.: docker run -p 127.0.0.1:53:53/tcp -p 127.0.0.1:53:53/udp --cap-add=NET_ADMIN leros321/dnsmasq:2.75 -q --log-facility=- -S /.sk/8.8.4.4

Stdout output: dnsmasq[1]: started, version 2.75 cachesize 150 dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify dnsmasq[1]: using nameserver 8.8.4.4#53 for domain sk dnsmasq[1]: reading /etc/resolv.conf dnsmasq[1]: using nameserver 8.8.4.4#53 for domain sk dnsmasq[1]: using nameserver 8.8.8.8#53 dnsmasq[1]: read /etc/hosts - 7 addresses dnsmasq[1]: query[A] pravda.sk from 172.17.0.1 dnsmasq[1]: forwarded pravda.sk to 8.8.4.4 dnsmasq[1]: reply pravda.sk is 217.67.31.48 dnsmasq[1]: query[A] sme.sk from 172.17.0.1 dnsmasq[1]: forwarded sme.sk to 8.8.4.4 dnsmasq[1]: reply sme.sk is 195.146.144.9 dnsmasq[1]: reply sme.sk is 195.146.144.8 dnsmasq[1]: query[A] google.com from 172.17.0.1 dnsmasq[1]: forwarded google.com to 8.8.8.8 dnsmasq[1]: reply google.com is 216.58.201.78

Tag summary

Content type

Image

Digest

Size

2.4 MB

Last updated

about 8 years ago

docker pull leros321/dnsmasq:2.75