DPS actually is fully supported on MAC knowing docker limitation features which can be bypassed with a reverse-proxy.
Running DPS as docker service
$ docker run -d -p 5380:5380 -p 53:53/udp -p 53:53/tcp --restart=unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \
defreitas/dns-proxy-server
Download the latest release (I recomend the jar one), extract and run:
$ sudo java -jar ./dns-proxy-server
Check this for usage samples.
When running on standalone mode (not on docker container) DPS will be able to auto configure itself as OSX default DNS,
after 5 seconds you see something like usingDnsConfigurator=DnsConfiguratorOSx
at the logs.
When not running in standalone mode you will need to configure DPS as default DPS manually, check the instructions below:
To list available networks:
$ networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
USB 10/100/1000 LAN
Wi-Fi
Thunderbolt Bridge
In my case the right Network is Wi-Fi
, before change anything let’s check if it has some manual
configured DNS server:
$ networksetup -getdnsservers Wi-Fi
There aren't any DNS Servers set on Wi-Fi.
If it returns some server IP then is a good idea to backup it then you can restore the configurations later.
Let’s set DPS as the default DNS Server, best option here is to get your network IP address, Wi-Fi
in my case which
has 192.168.0.14
set, 127.0.0.1
will partially works because this way containers won’t be able
to solve each other, just the host solve the containers.
Obs: Be aware you need to run DPS in port 53 as MAC doesn’t accept custom port especification.
$ networksetup -setdnsservers Wi-Fi 192.168.0.14
If you need to remove the configured DNS server then it will use your network provider DNS
$ networksetup -setdnsservers Wi-Fi Empty
See this thread with more use cases.