Thank you very much. I gonna try this right now. I'm coming from DD-WRT / FreshTomato but I feel like OpenWrt have way too much potential to give up. Here are my notes I've been using when creating my WAPs + Guest Wi-Fi + VLAN:
------DD-WRT Wireless Access Point (WAP) Setup:
A secondary router connected via LAN-to-LAN, on the same subnet as the primary router.
1. Hard reset the router to DD-WRT default settings
2. Connect to the router @ http://192.168.1.1
*Do not connect the router to the primary router until setup is complete.
3. Open the Setup -> Basic Setup tab
WAN Connection Type: Disabled
*The WAN port should now work as a LAN port. Avoid using this port with the primary router to prevent collisions after a reset.
*(Optional) Go to Switch Config, move the WAN port from vlan2 to vlan1.
*(Optional) Go to Networking -> WAN Port Assignment, change vlan2 to vlan1.
Local IP Address: e.g. 192.168.1.2 (same subnet as primary router but outside the DHCP range)
Gateway: IP address of primary router
Local DNS: IP address of primary router
DHCP Server: Disable (do not use DHCP Forwarder)
NTP Client: Enable (Canada/Eastern), then save and apply
4. Open the Wireless -> Basic Settings tab
*(Recommended) Set the Network Mode to "N/G Mixed" for 2.4 GHz and "AC/N Mixed" for 5 GHz.
Set the Wireless Network Name (SSID) as desired. (can use the same SSID and password as the main router)
*Do not leave Wireless Channel at Auto.
*Set different non overlapping Wireless Channel on each router. (e.g. 36, 40, 44, 48 or 149, 153, 157, 161 for 5 GHz and 1, 6, 11 for 2.4 GHz)
*Set the Channel Width to 20 MHz for 2.4 GHz and 80 MHz for 5 GHz.
5. Open the Wireless -> Wireless Security tab
Security Mode: WPA2-PSK
WPA Algorithm: CCMP-128 (AES)
WPA Shared Key: =>8 characters, then save and apply
6. Open the Administration -> Management tab
*(Recommended) Info Site Password Protection: Enable, then save and apply
-Enable VLAN on the Wireless Access Point (WAP):
1. Open the Setup -> Switch Config tab
Create a new VLAN (usually vlan3), move the desired LAN ports from vlan1 to vlan3. (e.g. LAN ports 3 and 4)
Save and apply.
2. Open the Setup -> Networking tab
Go to Create a bridge, create a new bridge called br1, turn off STP then save and apply.
Go to Assign to bridge, assign vlan3 to br1 then save and apply.
Scroll down to Network Configuration br1, enter the IP address for br1 (e.g. 192.168.5.1/24).
*Leave "Net Isolation" disabled as it does not work on a WAP.
*Go to Multiple DHCP Server, add a DHCP server for br1. (e.g. 192.168.5.11,192.168.5.244)
*When the DHCP server is set only through Dnsmasq Additional Options, clients connecting to VAPs bridged to br1 may experience a slight delay.
Save and apply.
-Enable Guest Wi-Fi on the Wireless Access Point (WAP):
1. Open the Wireless -> Basic Settings tab
Add two new 2.4 GHz and 5 GHz VAPS (Virtual Access Points).
*In Advanced Settings, enable "AP Isolation" but leave "Net Isolation" disabled as it does not work on a WAP.
Save and apply.
2. Open the Setup -> Networking tab
Go to Assign to bridge, assign both VAPs to br1. (In this case 2.4 GHz VAP is wl0.1 and 5 GHz VAP is wl1.1)
Save and apply.
3. Open the Services -> Services tab
*Go to Dnsmasq Infrastructure and make sure dnsmask is enabled.
-Put this code in Additional Options, then save and apply:
# br1 DHCP settings
interface=br1
dhcp-option=br1,3,192.168.5.1
dhcp-option=br1,6,1.1.1.1,1.0.0.1
dhcp-range=br1,192.168.5.11,192.168.5.244,255.255.255.0,24h
4. Open the Administration -> Commands tab
Put this code in the commands box and click Save Firewall:
# Enable NAT to give guests internet access from br0
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)
# Net Isolation does not work on a WAP so keep it disabled and add this to the firewall
iptables -I FORWARD -i br1 -d $(nvram get lan_ipaddr)/$(nvram get lan_netmask) -m state --state NEW -j REJECT
# Isolate the WAP itself from guests
iptables -I INPUT -i br1 -m state --state NEW -j REJECT
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
# Isolate guests from known private subnets
iptables -I FORWARD -i br1 -d 192.168.0.0/16 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -d 10.0.0.0/8 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -d 172.16.0.0/12 -m state --state NEW -j REJECT
# Isolate guests from each other
iptables -I FORWARD -i br1 -o wl0.1 -m state --state NEW -j REJECT
iptables -I FORWARD -i wl0.1 -o br1 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -o wl1.1 -m state --state NEW -j REJECT
iptables -I FORWARD -i wl1.1 -o br1 -m state --state NEW -j REJECT
Make sure all settings have been saved and applied then reboot the router.
Connect a LAN port from the Wireless Access Point to a LAN port on the main router.
If not working, you may have to reboot the PC or "ipconfig /release" then "ipconfig /renew" in Windows.
------FreshTomato Wireless Access Point (WAP) Setup:
A secondary router connected via LAN-to-LAN, on the same subnet as the primary router.
1. Hard reset the router to FreshTomato default settings
2. Connect to the router @ http://192.168.1.1
*Do not connect the router to the primary router until setup is complete.
3. Go to Administration -> Admin Access
Set Username and Password (Username = admin)
4. Go to Basic -> Network
Disable WAN
*(Optional) Go to Advanced -> VLAN, move the WAN port from vlan2 to vlan1.
IP Address: e.g. 192.168.1.2 (same subnet as primary router but outside the DHCP range)
Disable DHCP
Gateway: IP address of primary router
Static DNS: IP address of primary router
5. Go to Basic -> Time
UTC offsets: UTC-05:00 Eastern Time
Upstream Server: North America
6. Go to Advanced -> Virtual Wireless
Set the Wireless Network Name (SSID) as desired (can use the same SSID and password as the main router)
*Do not leave Wireless Channel at Auto.
*Set different non overlapping Wireless Channel on each router. (e.g. 36, 40, 44, 48 or 149, 153, 157, 161 for 5 GHz and 1, 6, 11 for 2.4 GHz)
*Set the Channel Width to 20 MHz for 2.4 GHz and 80 MHz for 5 GHz.
Security: WPA2 Personal
Encryption: AES
Shared Key: =>8 characters, then save
-Enable VLAN and Guest Wi-Fi on the FreshTomato Wireless Access Point (WAP):
1. Go to Advanced -> VLAN, create VLAN 3 (br1), click ok and save.
*Optionnal: Move the desired LAN ports from VLAN 1 to VLAN 3. (e.g. LAN ports 3 and 4)
2. Go to Basic -> Network
Enter the IP address for br1 (e.g. 192.168.5.1), disable DHCP, click ok then save.
3. Go to Advanced -> Virtual Wireless Interfaces
Create two Guest Wi-Fi interfaces (2.4 GHz + 5 GHz), assign them to br1, click ok and save. (2.4 GHz VAP is wl0.1 and 5 GHz VAP is wl1.1)
*Enable AP Isolation, set wireless settings and security for both Guest Wi-Fi interfaces.
4. Go to Advanced -> DHCP/DNS/TFTP
*Enable "Use user-entered gateway if WAN is disabled"
-Put this code in Dnsmasq Custom configuration, then save:
# br1 DHCP settings
interface=br1
dhcp-option=br1,3,192.168.5.1
dhcp-option=br1,6,1.1.1.1,1.0.0.1
dhcp-range=br1,192.168.5.11,192.168.5.244,255.255.255.0,24h
5. Go to Administration -> Scripts
Put this code in Firewall and click Save:
# Allow new connections from br1 (Needed because VLANs are isolated by default in FreshTomato)
iptables -I FORWARD -i br1 -m state --state NEW -j ACCEPT
# Enable NAT to give guests internet access from br0
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)
# Net Isolation for FreshTomato WAP (Block access to private LAN IPs from guests)
iptables -I FORWARD -i br1 -d 192.168.1.0/24 -m state --state NEW -j REJECT
# Isolate the WAP itself from guests
iptables -I INPUT -i br1 -m state --state NEW -j REJECT
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
# Isolate guests from known private subnets
iptables -I FORWARD -i br1 -d 192.168.0.0/16 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -d 10.0.0.0/8 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -d 172.16.0.0/12 -m state --state NEW -j REJECT
# Isolate guests from each other
iptables -I FORWARD -i br1 -o wl0.1 -m state --state NEW -j REJECT
iptables -I FORWARD -i wl0.1 -o br1 -m state --state NEW -j REJECT
iptables -I FORWARD -i br1 -o wl1.1 -m state --state NEW -j REJECT
iptables -I FORWARD -i wl1.1 -o br1 -m state --state NEW -j REJECT
Make sure all settings have been saved and applied then reboot the router.
Connect a LAN port from the Wireless Access Point to a LAN port on the main router.
If not working, you may have to reboot the PC or "ipconfig /release" then "ipconfig /renew" in Windows.