Guest & IoT Network Isolation - DNS Refused / No Internet

Hi everyone,

I finally started my long-queued project of migrating my home network to OpenWrt. I’ve managed to set up the basics, but I’ve hit a wall with my VLAN/Zone configuration and I’m hoping someone can point me in the right direction.

The Goal: I am trying to separate my network into three distinct zones:

  • LAN: 10.10.10.x (Trusted)
  • IoT: 10.10.66.x (Restricted)
  • Guest: 10.10.99.x (Isolated)

The Problem: My clients on the IoT and Guest networks can connect to Wi-Fi and receive an IP address via DHCP, but they have no internet access.

  • When I run dig google.com from a guest client, I get a REFUSED status.
  • It seems like the traffic is reaching the router, but either AdGuard Home is rejecting it, or the firewall isn't forwarding it correctly.

I am running AdGuard Home directly on the router. I tried adding the gateway IPs to bind_hosts in the YAML config, but the issue persists.

Here are my configurations (redacted). I suspect I might be missing a masquerading option or an AdGuard "allowed client" setting.

Thanks in advance for any help! I'm really enjoying OpenWrt so far, just need to get over this last hurdle.

Network Config:

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 'fdde:c01d:face::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

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

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth1'
        option proto 'dhcpv6'

config device
        option type 'bridge'
        option name 'br-iot'

config interface 'iot'
        option proto 'static'
        option device 'br-iot'
        list ipaddr '10.10.66.1/24'

config interface 'vpn'
        option proto 'wireguard'
        option private_key '<redacted>'
        option listen_port '51820'
        list addresses '10.10.20.1/24'

config wireguard_vpn
        option description 'Pixel9_teismar'
        option public_key '<redacted>'
        option private_key '<redacted>'
        option preshared_key '<redacted>'
        list allowed_ips '10.10.20.2/32'
        option persistent_keepalive '25'

config device
        option type 'bridge'
        option name 'br-guest'

config interface 'guest'
        option proto 'static'
        option device 'br-guest'
        list ipaddr '10.10.99.1/24'

Firewall Config:

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config zone
        option name 'iot'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        list network 'iot'

config forwarding
        option src 'iot'
        option dest 'wan'

config forwarding
        option src 'lan'
        option dest 'iot'

config rule
        option name 'Allow-DHCP-iot'
        list proto 'udp'
        option src 'iot'
        option dest_port '67'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCP-guest'
        list proto 'udp'
        option src 'guest'
        option dest_port '67'
        option target 'ACCEPT'

config rule
        option name 'Allow-DNS-iot'
        option src 'iot'
        option dest_port '53'
        option target 'ACCEPT'

config rule
        option name 'Allow-DNS-guest'
        option src 'guest'
        option dest_port '53'
        option target 'ACCEPT'

config zone
        option name 'WireguardVPN'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        list network 'vpn'

config forwarding
        option src 'WireguardVPN'
        option dest 'lan'

config forwarding
        option src 'WireguardVPN'
        option dest 'wan'

config forwarding
        option src 'lan'
        option dest 'WireguardVPN'

config rule
        option src 'wan'
        option name 'WireGuard-incoming'
        list proto 'udp'
        option dest_port '51820'
        option target 'ACCEPT'

config forwarding
        option src 'guest'
        option dest 'wan'

config zone
        option name 'guest'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        list network 'guest'

config forwarding
        option src 'lan'
        option dest 'guest'

WiFi Config:

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi'
        option band '2g'
        option channel 'auto'
        option htmode 'HE20'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Eiger'
        option encryption 'sae'
        option key '<redacted>'
        option ocv '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi+1'
        option band '5g'
        option channel 'auto'
        option htmode 'HE80'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'Eiger'
        option encryption 'sae'
        option key '<redacted>'
        option ocv '0'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Matterhorn'
        option encryption 'sae-mixed'
        option key '<redacted>'
        option ocv '0'
        option network 'iot'

config wifi-iface 'wifinet3'
        option device 'radio1'
        option mode 'ap'
        option ssid 'Matterhorn'
        option encryption 'sae-mixed'
        option key '<redacted>'
        option ocv '0'
        option network 'iot'

config wifi-iface 'wifinet4'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Grandes Jorasses'
        option encryption 'sae-mixed'
        option key '<redacted>'
        option ocv '0'
        option network 'guest'

config wifi-iface 'wifinet5'
        option device 'radio1'
        option mode 'ap'
        option ssid 'Grandes Jorasses'
        option encryption 'sae-mixed'
        option key '<redacted>'
        option ocv '0'
        option network 'guest'

AdGuard Home Config (partly):

dns:
  bind_hosts:
    - 127.0.0.1
    - 10.10.10.1
    - 10.10.66.1
    - 10.10.99.1
  port: 53
  allowed_clients: []

https://openwrt.org/docs/guide-user/network/wifi/guestwifi/configuration_webinterface will probably help.

could it be dhcp config related? e.g. dhcp option '6,10.10.66.1' should be used for 'iot' dhcp config.

We need to see two other things:

ubus call system board
cat /etc/config/dhcp
1 Like

That was exactly the missing piece.

I added list dhcp_option '6,10.10.66.1' (and the equivalent for Guest) to the DHCP config, and now the clients are correctly using the local interface IP for DNS. Everything is resolving perfectly now.

Thanks for the help!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.