Skip to content

Commit

Permalink
add log dns option
Browse files Browse the repository at this point in the history
  • Loading branch information
f18m committed Nov 29, 2024
1 parent b21b958 commit 22ba497
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions rootfs/usr/share/tempio/dnsmasq.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ server={{ . }}
{{ end }}
local=/home/

{{ if .log_dns }}
log-queries # log DNS related messages
{{ end }}


#
Expand All @@ -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 }}
Expand Down

0 comments on commit 22ba497

Please sign in to comment.