From bdd7ab6564a00f4ca9e3326db0ff9d0157ab4950 Mon Sep 17 00:00:00 2001 From: Newnius Date: Thu, 2 Jan 2020 11:20:00 +0800 Subject: [PATCH] update dnsmasq --- dnsmasq/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dnsmasq/README.md b/dnsmasq/README.md index 5b809ec..8debfb3 100644 --- a/dnsmasq/README.md +++ b/dnsmasq/README.md @@ -2,8 +2,6 @@ ## Deploy -#### Run as Server - ```bash docker run \ --name dnsmasq \ @@ -11,8 +9,18 @@ docker run \ --restart always \ --cap-add=NET_ADMIN \ --publish 53:53/udp \ + --net host \ --mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \ --mount type=bind,src=/data/dnsmasq/,dst=/etc/dnsmasq.d/ \ newnius/dnsmasq ``` +`--net host` is required, without which in other containers we may get `nslookup: can't resolve '(null)': Name does not resolve` error and would see following errors when `dig` + +``` +/ # dig @192.168.0.3 blog.newnius.com +;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53 +;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53 +;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53 +``` +