Add internal dns container
This commit is contained in:
7
ansible/roles/docker/files/dnsmasq/dnsmasq.conf
Normal file
7
ansible/roles/docker/files/dnsmasq/dnsmasq.conf
Normal file
@ -0,0 +1,7 @@
|
||||
bogus-priv
|
||||
keep-in-foreground
|
||||
server=1.1.1.1
|
||||
server=1.0.0.1
|
||||
port=53
|
||||
expand-hosts
|
||||
addn-hosts=/etc/dnsmasq-hosts.conf
|
11
ansible/roles/docker/files/dnsmasq/docker-compose.yml
Normal file
11
ansible/roles/docker/files/dnsmasq/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3"
|
||||
services:
|
||||
vpn-dns:
|
||||
image: programster/dnsmasq:latest
|
||||
container_name: vpn-dns
|
||||
ports:
|
||||
- "{{ wireguard.clients.intersect.ip }}:53:53/udp"
|
||||
volumes:
|
||||
- ./dnsmasq.conf:/etc/dnsmasq.conf:ro
|
||||
- ./vpn-hosts.conf:/etc/dnsmasq-hosts.conf:ro
|
||||
restart: unless-stopped
|
3
ansible/roles/docker/files/dnsmasq/vpn-hosts.conf
Normal file
3
ansible/roles/docker/files/dnsmasq/vpn-hosts.conf
Normal file
@ -0,0 +1,3 @@
|
||||
{% for host in internal_hostnames %}
|
||||
{{ wireguard.clients.intersect.ip }} {{ host }}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user