mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
dnsmasq.conf based on George's template
https://raw.githubusercontent.com/georgejhunt/iiab/37e9c4cdbe55709cb306862f4d3324449ec011d5/roles/network/templates/network/dnsmasq.conf
This commit is contained in:
parent
73fd3959b2
commit
450c04697d
2 changed files with 21 additions and 1 deletions
|
@ -46,7 +46,7 @@
|
|||
when: not dnsmasq_enabled and dnsmasq_install
|
||||
|
||||
- name: dnsmasq copy config file to /etc
|
||||
template: src=network/dnsmasq.conf dest=/etc/
|
||||
template: src=network/dnsmasq.conf.j2 dest=/etc/
|
||||
when: dnsmasq_enabled and dnsmasq_install
|
||||
|
||||
- name: Enable dnsmasq
|
||||
|
|
20
roles/network/templates/network/dnsmasq.conf.j2
Normal file
20
roles/network/templates/network/dnsmasq.conf.j2
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Never forward addresses in the non-routed address spaces.
|
||||
bogus-priv
|
||||
# Add other name servers here, with domain specs if they are for non-public domains.
|
||||
#server=/{{ iiab_domain }}/{{ iiab_hostname }}
|
||||
# Add local-only domains here, queries in these domains are answered from /etc/hosts or DHCP only.
|
||||
local=/{{ iiab_domain }}/
|
||||
# Make all host names resolve to the Raspberry Pi's IP address
|
||||
address=/#/{{ lan_ip }}
|
||||
# Specify the interface that will listen for DHCP and DNS requests
|
||||
interface={{ iiab_lan_iface }}
|
||||
# Set the domain for dnsmasq
|
||||
domain={{ iiab_domain }}
|
||||
# Specify the range of IP addresses the DHCP server will lease out to devices, and the duration of the lease
|
||||
dhcp-range=172.18.100.1,172.18.126.254,1h
|
||||
# Specify the default route
|
||||
dhcp-option=3,{{ lan_ip }}
|
||||
# Specify the DNS server address
|
||||
dhcp-option=6,{{ lan_ip }}
|
||||
# Set the DHCP server to authoritative mode.
|
||||
dhcp-authoritative
|
Loading…
Add table
Add a link
Reference in a new issue