I’ve been trying to get this set up on my R7800 with a recent master build from hnyman. I can’t get 2 instances of dnsmasq running, for starters. I then also have trouble using the second WiFi network to connect to the internet. When I read the wiki on dnsmasq (updated October 2018), I get the idea that the solutions posted here are not complete enough so I can understand what I’m doing wrong
Could someone please post their config files from /etc/config
? I prefer not the additions, but the whole file. And of course, don’t forget to remove passwords and SSID’s or anything that could relate to your stuff
I’m thinking I’d need:
/etc/config/dhcp
/etc/config/wireless
/etc/config/network
/etc/config/firewall
/etc/config/adblock
-- EDIT --
I got it! It's working now! I've combined it with adblock and safe-search. Safe-search is a new package that recently got merged in master. My recent R7800 build from hnyman was new enough to update the package list and install it.
For future reference, when I forget things or mess them up, here's my setup (the part that matters):
/etc/config/dhcp
:
config dnsmasq 'main'
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option expandhosts '1'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases.main'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
option serversfile '/tmp/adb_list.overall'
option local '/home/'
option domain 'home'
option nonwildcard '1'
list interface 'lan'
config dnsmasq 'kidsafe'
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option expandhosts '1'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases.kidssafe'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
option serversfile '/tmp/adb_list.overall'
option local '/kidsafe/'
option domain 'kidsafe'
option nonwildcard '1'
list interface 'kidsafe'
list notinterface 'lo'
list addnhosts '/etc/safe-search/enabled'
config dhcp 'lan'
option instance 'main'
option interface 'lan'
option dnsmasq_config 'main'
option dhcpv6 'server'
option ra 'server'
option start '80'
option limit '250'
option leasetime '24h'
option ra_default '1'
list domain 'local'
list dns 'fdad:be5a:4f7::1'
option force '1'
option ndp 'relay'
option ra_management '1'
config dhcp 'kidsafe_private'
option instance 'kidsafe'
option interface 'kidsafe'
option dnsmasq_config 'kidsafe'
option start '100'
option limit '250'
option leasetime '24h'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
option dnsmasq_config 'main'
/etc/config/network
:
config interface 'kidsafe'
option proto 'static'
option ipaddr '192.168.3.254'
option delegate '0'
option dns '9.9.9.9 149.112.112.112 2620:fe::fe'
option netmask '255.255.255.0'
/etc/config/wireless
:
config wifi-iface
option device 'radio0'
option network 'kidsafe'
option mode 'ap'
option encryption 'psk2+ccmp'
option wps_pushbutton '0'
option key '****'
option ssid 'OpenWRT-KidSafe'
option ieee80211w '2'
config wifi-iface
option device 'radio1'
option network 'kidsafe'
option mode 'ap'
option encryption 'psk2+ccmp'
option wps_pushbutton '0'
option key '****'
option ssid 'OpenWRT-KidSafe'
option ieee80211w '1'
And finally /etc/config/firewall
:
config zone
option name 'kidsafe'
option input 'ACCEPT'
option forward 'DROP'
option output 'ACCEPT'
option network 'kidsafe'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '53'
option name 'KidSafe DNS'
option src 'kidsafe'
config rule
option enabled '1'
option target 'ACCEPT'
option proto 'udp'
option dest_port '67-68'
option name 'KidSafe DHCP'
option src 'kidsafe'
config redirect 'adblock_dns'
option name 'Adblock DNS'
option src 'lan'
option proto 'tcp udp'
option src_dport '53'
option dest_port '53'
option target 'DNAT'
config redirect 'adblock_dns_kidsafe'
option name 'Adblock DNS KidSafe'
option src 'kidsafe'
option proto 'tcp udp'
option src_dport '53'
option dest_port '53'
option target 'DNAT'
config forwarding
option dest 'wan'
option src 'kidsafe'
Awesome stuff!
Remember that I also installed the package safe-search, hence I have one line in /etc/config/dhcp
that points to a directory where multiple lists can be added: list addnhosts '/etc/safe-search/enabled'