From 22ba497d9142ce759b1ca971eb75c5525a30d9bc Mon Sep 17 00:00:00 2001 From: f18m Date: Fri, 29 Nov 2024 01:21:02 +0100 Subject: [PATCH] add log dns option --- config.yaml | 5 +++-- rootfs/usr/share/tempio/dnsmasq.config | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index 50f26f6..63d010a 100644 --- a/config.yaml +++ b/config.yaml @@ -57,10 +57,9 @@ options: #- time3.google.com # example3: the entry 0.0.0.0 means "the address of the machine running dnsmasq" #- 0.0.0.0 - dns_server: + # should this addon provide also a DNS server? enable: true - dhcp_range: start_ip: 192.168.1.50 end_ip: 192.168.1.250 @@ -77,6 +76,7 @@ options: # the 'link' property accepts a basic golang template. Available variables are 'mac', 'name' and 'ip' # e.g. "http://{{ ip }}/landing/page/for/this/dynamic/host" link: + log_dns: true log_dhcp: true log_web_ui: false # this addon uses "host_network: true" so the internal HTTP server will bind on the interface @@ -117,6 +117,7 @@ schema: - mac: match(^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$) name: str link: "str?" + log_dns: bool log_dhcp: bool log_web_ui: bool web_ui_port: int diff --git a/rootfs/usr/share/tempio/dnsmasq.config b/rootfs/usr/share/tempio/dnsmasq.config index ede7316..25e30df 100644 --- a/rootfs/usr/share/tempio/dnsmasq.config +++ b/rootfs/usr/share/tempio/dnsmasq.config @@ -28,6 +28,9 @@ server={{ . }} {{ end }} local=/home/ +{{ if .log_dns }} +log-queries # log DNS related messages +{{ end }} # @@ -51,6 +54,7 @@ dhcp-range={{ .dhcp_range.start_ip }},{{ .dhcp_range.end_ip }},{{ .network.netma # Set gateway -- i.e. option #3 of DHCP specs dhcp-option=3,{{ .network.gateway }} +# if this dnsmasq instance has DNS enabled; then leave dnsmasq defaults in place which mean {{ if not .dns_server.enable }} {{ if .network.dns }} {{ if gt (len .network.dns) 0 }}