Follow this tutorial/commands to create two dnsmasq instances, however, after I follow the commands, I can't connect to the APs anymore (I'm trying to use the wifi) My build 22.03-snapshot
# Remove default instances
while uci -q delete dhcp.@dnsmasq[0]; do :; done
while uci -q delete dhcp.@dhcp[0]; do :; done
# Use network interface names for DHCP/DNS instance names
INST="lan guest"
for INST in ${INST}
do
uci set dhcp.${INST}_dns="dnsmasq"
uci set dhcp.${INST}_dns.domainneeded="1"
uci set dhcp.${INST}_dns.boguspriv="1"
uci set dhcp.${INST}_dns.filterwin2k="0"
uci set dhcp.${INST}_dns.localise_queries="1"
uci set dhcp.${INST}_dns.rebind_protection="1"
uci set dhcp.${INST}_dns.rebind_localhost="1"
uci set dhcp.${INST}_dns.local="/${INST}/"
uci set dhcp.${INST}_dns.domain="${INST}"
uci set dhcp.${INST}_dns.expandhosts="1"
uci set dhcp.${INST}_dns.nonegcache="0"
uci set dhcp.${INST}_dns.authoritative="1"
uci set dhcp.${INST}_dns.readethers="1"
uci set dhcp.${INST}_dns.leasefile="/tmp/dhcp.leases.${INST}"
uci set dhcp.${INST}_dns.resolvfile="/etc/resolv.conf.${INST}"
uci set dhcp.${INST}_dns.nonwildcard="1"
uci add_list dhcp.${INST}_dns.interface="${INST}"
uci add_list dhcp.${INST}_dns.notinterface="loopback"
uci set dhcp.${INST}="dhcp"
uci set dhcp.${INST}.instance="${INST}_dns"
uci set dhcp.${INST}.interface="${INST}"
uci set dhcp.${INST}.start="100"
uci set dhcp.${INST}.limit="150"
uci set dhcp.${INST}.leasetime="12h"
ln -f -s /tmp/resolv.conf.d/resolv.conf.auto /etc/resolv.conf.${INST}
done
uci -q delete dhcp.@dnsmasq[0].notinterface
uci commit dhcp
/etc/init.d/dnsmasq restart
Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have
ubus call system board; \
uci export network; uci export dhcp; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
Config looks alright. What is the problem exactly? Can't you connect to wifi at all? This would be irrelevant to the dnsmasq. If you can connect but don't get dhcp, this needs some more troubleshooting service dnsmasq restart; logread -e dnsmasq
Thu Jun 30 08:41:34 2022 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Thu Jun 30 08:41:34 2022 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Thu Jun 30 08:41:35 2022 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Thu Jun 30 08:41:35 2022 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Thu Jun 30 08:41:36 2022 user.err : jail: creat(/tmp/ujail-bnldhP/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:41:36 2022 user.err : jail: creat(/tmp/ujail-mMNLfC/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:41:36 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:41:36 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:41:36 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:41:36 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:41:41 2022 user.err : jail: creat(/tmp/ujail-mLaiPi/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:41:41 2022 user.err : jail: creat(/tmp/ujail-KHKgfm/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:41:41 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:41:41 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:41:41 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:41:41 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:07 2022 user.err : jail: creat(/tmp/ujail-OplOfF/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:07 2022 user.err : jail: creat(/tmp/ujail-LgpkEE/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:07 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:07 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:07 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:07 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:12 2022 user.err : jail: creat(/tmp/ujail-HJOkpI/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:12 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:12 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:12 2022 user.err : jail: creat(/tmp/ujail-lDLLka/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:12 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:12 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:17 2022 user.err : jail: creat(/tmp/ujail-LpfIEf/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:17 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:17 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:17 2022 user.err : jail: creat(/tmp/ujail-BFIcnB/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:17 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:17 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:22 2022 user.err : jail: creat(/tmp/ujail-lccDCn/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:22 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:22 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:22 2022 user.err : jail: creat(/tmp/ujail-ENmLAI/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:22 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:22 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:27 2022 user.err : jail: creat(/tmp/ujail-pfBKPg/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:27 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:27 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:27 2022 user.err : jail: creat(/tmp/ujail-Ieckde/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:27 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:27 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:32 2022 user.err : jail: creat(/tmp/ujail-KhplkF/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:32 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.lan for resolv-file is missing, cannot poll
Thu Jun 30 08:44:32 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:32 2022 daemon.info procd: Instance dnsmasq::lan_dns s in a crash loop 6 crashes, 0 seconds since last crash
Thu Jun 30 08:44:32 2022 user.err : jail: creat(/tmp/ujail-GNedlK/etc/dnsmasq.conf) failed: Read-only file system
Thu Jun 30 08:44:32 2022 daemon.crit dnsmasq[1]: directory /etc/resolv.conf.guestwifi for resolv-file is missing, cannot poll
Thu Jun 30 08:44:32 2022 daemon.crit dnsmasq[1]: FAILED to start up
Thu Jun 30 08:44:32 2022 daemon.info procd: Instance dnsmasq::guestwifi_dns s in a crash loop 6 crashes, 0 seconds since last crash
quick fix about 'failed to seed the random number generator' problem:
edit /etc/init.d/dnsmasq
add /dev/urandom at the end of this line procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
final line looks like: procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers /dev/urandom
I just found that in 22.03.3 the same problem still exists, luckily I was able to find this thread out (because all my clients were able to get the IPv6 ULA assignment from my OpenWRT but no IPv4 at all!)