Dnsmasq randomly crashes

I have built from the official image builder trying both both official and snapshot, and with this helper script.

I am using this minipc running proxmox.

Unfortunately, I do not have logs, because the last time dnsmasq crashed was over 12hrs ago. But the log usually just shows dnsmasq in a "crash loop" in the log. I have disabled unbound, adblock, and adblock-fast just to rule those out. I point OpenWRT to both my pihole servers for DNS (both IPV4 & IPV6).

dnsmasq crashes actually are far worse using the helper script, usually multiple times a day. Bad enough that restarting dnsmasq doesn't work, and I have to usually reboot the VM. Snapshot it has happened maybe twice over 3-days, and I am able to restart dnsmasq via CLI to get things back up.

Is there maybe a script that I can use that can monitor dnsmasq, so if it crashes the script will auto restart dnsmasq?

Here are my configs:

network:

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd8f:9932:5c4a::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'eth1'
	option proto 'dhcp'
        option peerdns '0'
        list dns '192.168.1.102'
        list dns '192.168.1.101'
        list dns '8.8.8.8'



config interface 'wan6'
	option device 'eth1'
	option proto 'dhcpv6'
        option peerdns '0'
        list dns 'fd60:1ed0:ca21:0:7:f1ff:feae:afa5'
        list dns '2601:40f:4400:5b8c::306'

dhcp:

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list dhcp_option '6,192.168.1.102,192.168.1.101,8.8.8.8'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

if you have a pihole, why are you running dnsmasq at all, same applies to adblock, adblock-fast, etc ?

unclear, is openwrt hosting proxmox, or is proxmox hosting openwrt ?

are you sure you haven't created a DNS query loop between the pis and dnsmasq ?

since you have proper storage, write the system log to disk.

1 Like

What does the log say? There is a reason WHY it's crashing. It should be in the log.

1 Like

Openwrt is running as a VM within proxmox. I have changed dns in both network and dhcp configs back to google dns to narrow the field.

https://imgur.com/a/IigslP4

If it happens again, I will post logs.

The reason I am running dnsmasq from openwrt, because I prefer my dhcp server from my router setup opposed to being on a seperate server.

are you using DNS hijacking too ?

you should probably tell dnsmasq's DNS to ignore the LAN interface...

I assume that would be in /etc/dnsmasq.conf, correct?

What's the best way to tell dnsmasq's DNS to ignore the LAN?

Thank you. I will change it to listen to lan, and see if that improves my previous issues.