From 575ec91ad2061958d15e7c600767cce38c4a88d0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 22 Jan 2022 10:04:29 +0200 Subject: fix: use dnsmasq for DHCP, local DNS, instead of systemd It seems systemd-networkd and friends don't support adding DHCP clients to local DNS, and that's a requirement. Use dnsmasq instead. Sponsored-by: author --- puomi-installer-playbook.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/puomi-installer-playbook.yml b/puomi-installer-playbook.yml index 8bd5522..e27fca8 100644 --- a/puomi-installer-playbook.yml +++ b/puomi-installer-playbook.yml @@ -15,6 +15,25 @@ - bridge-utils - man - ferm + - dnsmasq + - bind9-dnsutils + + - name: "configure dnsmasq for .d support" + lineinfile: + path: /etc/dnsmasq.conf + regexp: ^conf-dir + line: "conf-dir=/etc/dnsmasq.d/,*.conf" + + - name: "configure dnsmasq for router" + copy: + content: | + dhcp-range=10.1.1.10,10.1.1.250,255.255.255.0,1h + host-record=puomi,10.1.1.1 + interface=br0 + interface=lo + max-cache-ttl=30 + neg-ttl=10 + dest: /etc/dnsmasq.d/router.conf - name: "configure hostapd" copy: @@ -38,7 +57,7 @@ rsn_pairwise=CCMP dest: /etc/hostapd/hostapd.conf - - name: "configure ferm" + - name: "configure ferm firewall" copy: content: | table filter { @@ -84,14 +103,9 @@ [Network] Address=10.1.1.1/24 - DHCPServer=true + DHCPServer=false IPMasquerade=true ConfigureWithoutCarrier=true - - [DHCPServer] - PoolOffset=100 - PoolSize=50 - EmitDNS=yes dest: /etc/systemd/network/br0.network vars: -- cgit v1.2.1