You can run DPS on Windows host without any issues except by DPS isn’t capable yet (see backlog issue) to connect to docker API and solve containers.
java -jar dns-proxy-server.jar
If you run DPS as administrator (using administrator prompt) then it will capable of configure itself as the default DNS or check instructions below of how to set DPS as default DNS manually.
DPS on Docker have one limitation, it won’t be able to set itself as default DNS automatically (instructions below)
Start up DPS
docker run --name dns-proxy-server -p 5380:5380 -p 53:53/udp \
-v /var/run/docker.sock:/var/run/docker.sock \
defreitas/dns-proxy-server
Change your default internet adapter DNS to 127.0.0.1
Windows + R
and type ncpa.cpl
then press enter or go to your network interfaces Window127.0.0.1
by following the
pictures belowUncheck IPV6 because Windows can try to solve hostnames by using a IPV6 DNS server, then requests won’t be sent to DPS, actually DPS doesn’t support IPV6.
Starting some docker container and keeping it alive for DNS queries
$ docker run --rm --hostname nginx.dev.intranet \
-e 'HOSTNAMES=nginx2.dev.intranet,nginx3.dev.intranet' nginx
Solving the docker container hostname from Dns Proxy Server
$ nslookup nginx.dev.intranet
Server: 172.22.0.6
Address: 172.22.0.6#53
Non-authoritative answer:
Name: debian.dev.intranet
Address: 172.22.0.7
Google keep working was well
$ nslookup google.com
Server: 172.22.0.6
Address: 172.22.0.6#53
Non-authoritative answer:
Name: google.com
Address: 172.217.29.206
Start the server at custom port and solving from it
$ nslookup -port=8980 google.com 127.0.0.1