Ok... if the advice I give doesn't work, please tag in the person who generated that image since they may have ideas about why it isn't working properly and/or need to know about the problems in order to help fix the underlying code.
You'll start by adding bridge VLANs:
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'lan2:t'
config bridge-vlan
option device 'br-lan'
option vlan '2'
list ports 'lan2:t'
config bridge-vlan
option device 'br-lan'
option vlan '3'
list ports 'lan2:t'
list ports 'lan3:u*'
list ports 'lan4:u*'
Next, edit the lan to use br-lan.1
:
config interface 'lan'
option device 'br-lan.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
And now we can create new network interface stazas:
config interface 'vlan2'
option device 'br-lan.2'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
config interface 'vlan3'
option device 'br-lan.3'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
Create DHCP servers for each of the new networks (/etc/config/dhcp
)
config dhcp 'vlan2'
option interface 'vlan2'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
config dhcp 'vlan3'
option interface 'vlan3'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
And now we'll move onto the firewall (/etc/config/firewall
):
Create new zones for the two new networks:
config zone
option name 'vlan2'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'vlan2'
config zone
option name 'vlan3'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'vlan3'
We'll now add the forwards you've requested:
config forwarding
option src 'vlan3'
option dest 'wan'
config forwarding
option src 'vlan2'
option dest 'van3'
config forwarding
option src 'vlan3'
option dest 'vlan2'
The above will allow the following:
- lan (vlan1) > wan
- vlan2 > vlan3
- vlan3 > vlan2
- vlan3 > wan
Reboot and test.