Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:dsa:dsa-mini-tutorial [2023/04/27 11:46] – added a section about firewall zones for VLAN interfaces microraptor | docs:guide-user:network:dsa:dsa-mini-tutorial [2023/10/19 02:58] – [Introduction] saudiqbal | ||
|---|---|---|---|
| Line 310: | Line 310: | ||
| list network ' | list network ' | ||
| </ | </ | ||
| + | |||
| + | ==== 6. Security Considerations with VLANs ==== | ||
| + | |||
| + | See [[https:// | ||
| + | |||
| + | * If using separated VLANs, it is often recommended not to use VLAN 1 for any data networks. This is because VLAN 1 is often hardcoded as a default on a lot of networking equipment and is therefore more often used in attacks and prone to accidental misconfiguration. | ||
| + | |||
| + | * It is also often recommended to change the native VLAN on all trunk ports to an unused VLAN ID to explicitly only allow tagged traffic on trunk ports. Note that some hardware doesn' | ||
| + | |||
| + | * Similarly, for added security any unused LAN ports can be also added (as u|*) to an unused VLAN ID. | ||
| + | |||
| + | As an example let's assume a setup where: | ||
| + | * VLANS 10, 20 and 30 are used for seperated VLANs without any layer 3 routing | ||
| + | * the ports lan1 and lan2 are trunked ports with all VLANs | ||
| + | * port lan3 is only for untagged VLAN 1 | ||
| + | * port lan4 is unused | ||
| + | * VLAN 90 is not used anywhere else and is only there for added security | ||
| + | |||
| + | < | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | | VLAN ID | Local | lan1 | lan2 | lan3 | lan4 | | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | | 10 | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | | 20 | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | | 30 | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | | 90 | ||
| + | +---------+-------+------+------+------+------+ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | config device ' | ||
| + | option name ' | ||
| + | option type ' | ||
| + | option macaddr ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan ' | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | option local ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | option device ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | option device ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | option device ' | ||
| + | </ | ||
| + | |||
| + | Note: Because local is not checked for VLAN 90, OpenWrt won't even create a device for it and there should be no interface for it, unlike the other VLANs. | ||
| + | |||