Skip to content

Commit 4357d4e

Browse files
committed
dnsmasq - change to host network mode so that other containers can use
it with no extra per-container configuration updated dnsmasq.conf example
1 parent b6ae187 commit 4357d4e

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

dnsmasq/conf/dnsmasq.conf-example

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# this should be the IP address in .env
2-
listen-address=172.80.0.2
1+
# this should be the IP address of the interface we want to accept queries
2+
# finding that 0.0.0.0 does not work
3+
listen-address=EXTERNAL INTERFACE IP ADDRESS
34

45
log-queries
56
domain-needed
@@ -28,4 +29,5 @@ server=/corginium.ctrlh/192.168.13.11
2829

2930
# default DNS server
3031
# 9.9.9.9 is considered more private than Google (8.8.8.8) or Cloudflare (1.1.1.1)
31-
server=9.9.9.9
32+
# you may prefer to use your router so that it can resolve local names
33+
server=192.168.13.1

dnsmasq/docker-compose.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ services:
33
restart: unless-stopped
44
image: jpillora/dnsmasq
55
container_name: dnsmasq
6-
networks:
7-
dnsmasq:
8-
ipv4_address: "${IPV4_ADDRESS}"
9-
proxy:
6+
network_mode: host
7+
# networks:
8+
# dnsmasq:
9+
# ipv4_address: "${IPV4_ADDRESS}"
10+
# proxy:
1011
volumes:
1112
- ./conf/dnsmasq.conf:/etc/dnsmasq.conf
1213
- ./conf/hosts.d:/etc/hosts.d
13-
ports:
14-
- "53:53/udp"
14+
# ports:
15+
# - "53:53/udp"
1516
# - "8080:8080"
1617
env_file:
1718
- .env
19+
1820
networks:
1921
dnsmasq:
2022
name: dnsmasq

0 commit comments

Comments
 (0)