Conditional Forwarding DNS fix (#27)

* Make dnsmasq listen to the container network

* Conditional Forwarding for NextDNS

* Update nextdns.conf
This commit is contained in:
John D 2020-07-25 01:14:31 -07:00 committed by GitHub
parent 53eb24d9d5
commit 1f82b5c2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -69,6 +69,12 @@ if [ -n "${IPV6_IP}" ]; then
ip -6 route add ${IPV6_IP}/128 dev br${VLAN}.mac ip -6 route add ${IPV6_IP}/128 dev br${VLAN}.mac
fi fi
# Make DNSMasq listen to the container network for split horizon or conditional forwarding
if ! grep -qxF interface=br$VLAN.mac /run/dnsmasq.conf.d/custom.conf; then
echo interface=br$VLAN.mac >> /run/dnsmasq.conf.d/custom.conf
kill -9 `cat /run/dnsmasq.pid`
fi
if podman container exists ${CONTAINER}; then if podman container exists ${CONTAINER}; then
podman start ${CONTAINER} podman start ${CONTAINER}
else else

View File

@ -4,4 +4,14 @@ listen :53
report-client-info yes report-client-info yes
cache-size=10MB cache-size=10MB
# Change this if you changed your subnet, should point to your router, comment out
# if you want to discover via DHCP
discovery-dns 10.0.5.1
# Change and uncomment this if you want to resolve your local ips
# forwarder your.domain=10.0.5.1
# Change and uncomment if you want to resolve ptr records
# bogus-priv false
# forwarder 10.in-addr.arpa=10.0.5.1
config YOURIDHERE config YOURIDHERE