I am running the latest stable OpenWrt (with DSA) on my switch, but I found no information about what the firewall settings should look like, when having multiple VLANs on DSA and running only a switch.
Lets take this example with three vlans and two tagged trunk ports:
+---------+-------+------+------+------+------+
| VLAN ID | Local | lan1 | lan2 | lan3 | lan4 |
+---------+-------+------+------+------+------+
| 10 | X | t | t | u|* | - |
+---------+-------+------+------+------+------+
| 20 | X | t | t | - | u|* |
+---------+-------+------+------+------+------+
| 30 | X | t | t | - | - |
+---------+-------+------+------+------+------+
All three VLANs should be kept completely seperate from each other without any layer 3 routing.
Lets say VLAN 10 is used to access LUCI or SSH. The the default LAN interface can be used with the LAN zone, where Input and Output is accepted.
First question:
Should I create interfaces and firewall zones for the other two VLANs? The options would be:
- Don't create any interfaces for the VLANs and disable the local flag
- Don't create any interfaces for the VLANs and enable the local flag
- Create seperate interfaces for VLANs, but leave the firewall zone unspecified
- Create seperate interfaces for VLANs, with one firewall zone
- Create seperate interfaces for VLANs, with seperate firewall zones
How should Input, Output and Forward be set in "Firewall -> Zone Settings -> General Settings"? And how should they be set for specific zones, if they are created?
The default firewall rules "Allow-IPSec-ESP" and "Allow-ISAKMP" can be safely deleted for a switch, right?
Second question:
There seem to be a lot of sources on the internet (like wikipedia: https://en.wikipedia.org/wiki/VLAN_hopping#Double_tagging) saying it is best practice to make an unused VLAN native/untagged for all trunk ports. So should I change my setup to this, where VLAN 90 is not used anywhere else?
+---------+-------+------+------+------+------+
| VLAN ID | Local | lan1 | lan2 | lan3 | lan4 |
+---------+-------+------+------+------+------+
| 10 | X | t | t | u|* | - |
+---------+-------+------+------+------+------+
| 20 | X | t | t | - | u|* |
+---------+-------+------+------+------+------+
| 30 | X | t | t | - | - |
+---------+-------+------+------+------+------+
| 90 | | t|* | t|* | - | - |
+---------+-------+------+------+------+------+
Or does OpenWrt automatically disregard all untagged traffic, if no PVID is defined for that port and there is no difference between the two setups?
Also do the practices outlined here, https://en.wikipedia.org/wiki/VLAN_hopping#Switch_spoofing (disabling trunk negotiation), apply to OpenWrt, or are the default settings already secure?
Third question:
Are there any other settings recommended for an OpenWrt VLAN switch setup?