I've been following this guide to create a guest wi-fi.
After several tries, I can't connect to it. The clients (either a Windows computer or an Android phone) just can't connect, and I don't understand why.
Here are my configurations :
root@OpenWrt:~# ubus call system board
{
"kernel": "6.6.67",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "Xiaomi Mi Router AX3000T (OpenWrt U-Boot layout)",
"board_name": "xiaomi,mi-router-ax3000t-ubootmod",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "24.10.0-rc4",
"revision": "r28211-d55754ce0d",
"target": "mediatek/filogic",
"description": "OpenWrt 24.10.0-rc4 r28211-d55754ce0d",
"builddate": "1734915335"
}
}
root@OpenWrt:~# cat /etc/config/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 'fd80:86f9:aa6::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
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'
list dns '192.168.1.2'
list dns '192.168.1.254'
option gateway '192.168.1.254'
config device
option name 'wan'
option macaddr '50:88:11:50:ed:46'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface 'vpn'
option proto 'wireguard'
option private_key 'XXX'
option listen_port '51821'
list addresses '192.168.9.1/24'
list addresses 'fd00:9::1/64'
option defaultroute '0'
config wireguard_vpn 'wgclient'
option public_key 'XXX'
option preshared_key 'XXX'
list allowed_ips '192.168.9.2/32'
option route_allowed_ips '1'
config device
option type 'bridge'
option name 'br-guest'
option bridge_empty '1'
config interface 'guest'
option proto 'static'
option device 'br-guest'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone 'lan'
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
option masq '1'
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 rule 'wg'
option name 'Allow-WireGuard'
option src 'wan'
option dest_port '51821'
option proto 'udp'
option target 'ACCEPT'
config zone 'wan'
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config zone
option name 'vpn'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'vpn'
config forwarding
option src 'vpn'
option dest 'lan'
config zone
option name 'guest'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'guest'
option masq '1'
config forwarding
option src 'guest'
option dest 'wan'
config rule
option name 'Allow-DNS-Guest'
option src 'guest'
option dest_port '53'
option target 'ACCEPT'
config rule
option name 'Allow-DHCP-Guest'
list proto 'udp'
option src 'guest'
option dest_port '67'
option target 'ACCEPT'
It looks like this is not the main router, correct?
Right, I have my ISP router first, and my OpenWRT router connected with ethernet to the ISP router.
I applied your recommendation and I can now connect to the guest SSID, but it seems that my computer can't get an IP, as an ipconfig gives me "169.254.119.227".
config zone
option name 'guest'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'guest'
config forwarding
option src 'guest'
option dest 'lan'
I will check the thread you linked me, but I'm not sure if I could apply it as it is. My goal is to forbid the guests to access the lan, but allow them to access the internet.
Remove the ocv line in both sections, and change from sae-mixed to wpa2 (psk2) or wpa3 (sae) instead. Probably wpa2 is best for compatibility. WPA2/3 mixed mode (sae-mixed) tends to cause issues on some client devices.
Reboot after making the change and then test. If it still doesn't work, let's review all the files again (network, firewall, DHCP, wireless).
Are you able to ping a public address like 8.8.8.8 (from the client device)?
If DHCP isn't working, try setting your computer/device to a static ip (192.168.2.7, subnet mask 255.255.255.0, gateway and DNS 192.168.2.1) and then test your ability to ping a public IP address and/or domain name.
You already have a DHCP server on your upstream network. If the DHCP server on the lan interface of OpenWrt becomes enabled, it will make a mess of things because you can only have one DHCP server on a network segment.
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks!