W1 in a dedicated SSID/Network/Zone.
Use firewall rules to allow access to W2/W3 to that zone and drop everything else. Also allow internet to wan zone.
Still struggling to have iPhone internet access enabled but block iPhone from seeing other wireless devices (just for this learning curve - final goal will be different)
Blocking devices from seeing each other falls into 2 broad categories:
Firewall: The firewall operates at L3 (in general), so you can use the firewall to block connections between different networks, but the firewall is generally not involved at L2 (switching). This means that you must use different networks/VLANs to control connections between devices.
[side note] There is a possibility of a bridge firewall method, but it has some limitations/quirks that make it less than ideal.
Wifi client isolation: This is an all-or-none method of isolating wireless client devices from each other. This only works for wireless clients on the same SSID + AP. It does not isolate wireless devices from wired devices on the same L2 network. If you run multiple APs, the clients on one AP will appear as if they are wired devices to clients on another AP, thus preventing the wifi client isolation from truly isolating all clients. This cannot be selectively applied -- it is either on or off. You can find this under the wifi settings.
Thanks but as per my diagram in opening post, this is not what I want. I want wireless devices talking to each other, so I've stayed clear of wifi client isolation
For this part does "different networks" mean different 'firewall zones' essentially?
I have tried the VLAN approach but struggled - hence this thread asking for some advice how to do it
I hit a wall with firewall traffic rules also - the rules don't seem to be doing anything, per my posts yesterday
I understand that... I just wanted to point out that, while this is a potential tool, it is all-or-nothing, and that it is not necessarily useful in every situation (such as yours). But further, this is generally the only way to block L2 connections for wifi devices.
It can, but does not require different zones. Different networks means different subnets. So for example, 192.168.1.0/24 and 192.168.2.0/24 (or any 2 or more non-overlapping RFC1918 address ranges).
Posting your complete config data (see below) is the best way for us to understand the configuration as it stands now. The screen grabs really aren't good for debugging what is happening.
The firewall doesn't operate on the traffic unless it is routed (i.e. VLANs). And depending on how your rules are crafted, they may appear not to work because of the order of execution or other details. That's why the text configuration files are so much easier to use for debug...
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
Wifi zone doesn't need masquerade.
Wifi zone doesn't forward to lan, or vice versa. You'd need to add a rule to allow the traffic from Wifi to lan. For the reverse, you might want to enable the lan to wifi forwarding.
Regarding the rule, you need to allow from source IP to destination IP, not MAC (as MAC is not preserved). If you are using hostnames for the communicaton, you may want to allow IPv6 as well.
For more details and troubleshooting, post the files mentioned by @psherman .
I've tried this but the rules don't seem to be getting obeyed. The below screenshot, I would assume does the same as bridging WiFi and LAN but doesn't seem to do anything.
Sorry my mistake - I just selected IP address via Luci dropdown (which shows the MAC address in brackets). But I believe the rule is via IP address this way
Thanks for your help! outputs below. It's a very simple setup and I'm not trying to do anything advanced (I didn't think). But I don't have much experience in VLANs . And the simple firewall zone rules aren't doing what I thought but it could be due to what you mentioned, L2 and L3
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 'XXXXX'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'
list ports 'eth2'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option device 'br-lan'
config interface 'wan'
option device 'eth0'
option proto 'dhcp'
option peerdns '0'
list dns '1.1.1.1'
list dns '1.0.0.1'
config interface 'WiFi'
option device 'wlan0'
option proto 'static'
option ipaddr '172.16.0.1'
option netmask '255.255.255.0'
Rules are correct. However are you certain that iphone can communicate with airplay streamer in a different network? Is it possible it works with mdns or broadcasts?
What is the output of ubus call system board; iptables-save -c -t filter ?
FWIW, Airplay does use mdns/zero-config networking to function... this does not route across networks by default. You need an mdns reflector/repeater, and that doesn't always allow it to work, either.
EDIT: I hit the reply button for @trendy 's comment (which is on-point), but this should really be directed towards @v2zEPhNxdm .
Airplay was a bad example/starting point to try to explore firewall rules then.
I guess blocking between firewall zones is more of what I'm trying to achieve (per opening post diagram - blocking W1 from LAN connections) rather than allowing like I've been trying here with Airplay