My main router wifi has to be off (because of it's location) and i need to use multiple access points AND allow guest access WITH QOS (low priority to the guest letwork)
So this is the solution (my solution uses non-standard port mapping, for safety - resetting the router will not connect the main and the guest network together)
1. edit /etc/gargoyle_default_ifs to:
Code: Select all
default_lan_if eth1
default_wan_if eth0.3
2. delete from /etc/config/network all "config switch_vlan" sections
3. add to /etc/config/network:
Code: Select all
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 1'
config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '0t 2 3'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '0t 4'
config interface 'FreeWifi'
option proto 'static'
option ifname 'eth0.2'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
Code: Select all
config dhcp 'FreeWifi'
option interface 'FreeWifi'
option start '100'
option leasetime '12h'
option limit '151'
Code: Select all
config zone
option input 'ACCEPT'
option output 'ACCEPT'
option name 'freewifi'
option forward 'ACCEPT'
option network 'FreeWifi'
config forwarding
option src 'freewifi'
option dest 'wan'
config rule
option src 'freewifi'
option name 'block access to router for guests'
option dest_port '80 20 22 443'
option target 'REJECT'
The WAN port is for your own LAN, the WAN should be connected to one of the lan ports (more on that later) of the router and 2 ports for guest wifi access points
The extra port may be configured for an extra LAN/GUEST port or a trunk connection for a smart switch or multi SSID wireless AP.
Never manually edit "config interface lan" and "config interface wan" - they get overwritten by the GUI - edit /etc/gargoyle_default_ifs instead
WLAN may be enabled for one or two of those networks (i didn't test it, you may need add "option type 'bridge'" to "config interface 'FreeWifi'")
Known bugs:
- The port numbers for VLAN assignment may not match port numbers written on the router ports (known "WONTFIX" bug from openwrt)
- In Bandwidth Usage you can't select the guest network users
- B/W Distribution doesn't include the guest network
- "All individual hosts without explicit quota" does not include the guest network
- Backup / Restore configuration doesn't save /etc/gargoyle_default_ifs
The next thing: using this approach in GUI?