Ubiquiti UniFi 6 Plus - VLAN configuration

Hey there,

I just installed openWRT onto my UniFi 6+ but I am running into some issues that I don't really understand.

Note that I've followed the steps in this guide to make it a "dumb ap".

I do have a pfSense firewall running at 192.168.120.1 and I have configured five different VLANs in pfSense and I've setup the rules as I want.

My firewall also has a port that I dedicated to the interface at 192.168.122.1 (the gateway) and I've set my UniFi 6+ to have the static IP of 192.168.122.2.

However, when trying to configure the device I am doing as follows:

  1. Creating a new "bridge device" and I have my only port selected in the "Bridge ports" list.

  2. Setting up the VLANs as I want them (10 for IoT, 40 for guest and so on), then I save and I save and apply.

  3. I then configure the newly created bridge by selecting all of the created VLANs in the "Bridge port" list and under the "Bridge VLAN filtering" option, I set "t" on all of the VLANS under "eth0" as well as themselves since I don't want a VLAN to know about another VLAN.

  4. Now I create an interface called "Guest" and I assign it a static IPv4 (192.168.4) and I set the IPv4 gateway to be 192.168.40.1

(Note that the gateway IP is what I've set in pfSense)

I save and apply.

  1. Now I am setting up a new SSID as in the image:

  2. The wifi is disabled and I press "Enable" and all of a sudden I lose access to the GUI of openWRT.

I can't get back in and if I try to SSH nothing happens as well as pinging results in a packet loss.

I assume that I am doing something wrong, but I do not know what it is.
Any help appreciated.

Let's see the current status of the config in text form to understand what is going on.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

You can use the reset button on the UniFi 6+ to instruct OpenWrt to do a hard reset. This will erase the faulty configuration and put the flash back to what it was when you installed OpenWrt. From the wiki:

On devices with a physical reset button, OpenWrt can be reset to default settings without serial or SSH access.

  1. Power on the device and wait for the status led to stop flashing (or go into failsafe mode, as described above).
  2. Press and hold the reset button for 10 seconds.
  3. Release the reset button.

The device will do a hard factory reset (see below) and then reboot. This operation can be slow on some devices, so wait a few minutes before connecting again.

Then try to configure your device again, but do not click "Save & Apply" at any point. Instead, click on "unsaved changes" near the upper-right corner of LuCI to show us exactly what configuration changes you're about to make.

Hey @psherman,

Here's the output:


// ubus call system board
{
	"kernel": "6.6.73",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 4",
	"model": "Ubiquiti UniFi 6 Plus",
	"board_name": "ubnt,unifi-6-plus",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.0",
		"revision": "r28427-6df0e3d02a",
		"target": "mediatek/filogic",
		"description": "OpenWrt 24.10.0 r28427-6df0e3d02a",
		"builddate": "1738624177"
	}
}

// cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdeb:290d:a83d::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.122.2'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.122.1'

config device
	option type 'bridge'
	option name 'VLANs'
	list ports 'eth0'
	list ports 'VLANs.10'
	list ports 'VLANs.20'
	list ports 'VLANs.30'
	list ports 'VLANs.40'
	list ports 'VLANs.50'

config bridge-vlan
	option device 'VLANs'
	option vlan '10'
	list ports 'eth0:t'
	list ports 'VLANs.10:t'

config bridge-vlan
	option device 'VLANs'
	option vlan '20'
	list ports 'eth0:t'
	list ports 'VLANs.20:t'

config bridge-vlan
	option device 'VLANs'
	option vlan '30'
	list ports 'eth0:t'
	list ports 'VLANs.30:t'

config bridge-vlan
	option device 'VLANs'
	option vlan '40'
	list ports 'eth0:t'
	list ports 'VLANs.40:t'

config bridge-vlan
	option device 'VLANs'
	option vlan '50'
	list ports 'eth0:t'
	list ports 'VLANs.50:t'

config interface 'Guest'
	option proto 'static'
	option device 'VLANs.40'
	option ipaddr '192.168.40.2'
	option netmask '255.255.255.0'
	option gateway '192.168.40.1'
	option type 'bridge'


// cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi'
	option band '2g'
	option channel '1'
	option htmode 'HE20'
	option cell_density '0'
	option disabled '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi+1'
	option band '5g'
	option channel '36'
	option htmode 'HE80'
	option disabled '1'

config wifi-iface 'wifinet0'
	option device 'radio0'
	option mode 'ap'
	option ssid 'CDR Guest'
	option encryption 'psk2'
	option hidden '1'
	option key 'testtest'
	option disabled '1'
	option network 'Guest'


// cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ignore '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

// cat /etc/config/firewall

config defaults
	option syn_flood	1
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	00:11:22:33:44:66
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		192.168.16.230
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port	80
#	option dest		wan
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	192.168.45.2
#	option src_mac	00:11:22:33:44:55
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	194.25.2.129
#	option dest_port	120
#	option proto	tcp

Hey @elbertmai,

I've done a hard reset and made my changes and posted the output above.
Does that help or is a screenshot of the changes more valuable?

That is not how to do it at all. I suggest starting over at least with the network part.

Since this hardware has its single Ethernet port directly connected to the CPU (there is no hardware switch and multiple ports) there are two ways to configure a VLANd AP.

The first way is the one that only works here and will not work on a device with a switch. Use a separate bridge for each VLAN.

config device
   option type 'bridge'
   option name 'br-lan'
   list ports 'eth0.1'

config device
   option type 'bridge'
   option name 'br-vlan10'
   list ports 'eth0.10'

config interface 'lan'
   option device 'br-lan'
   ...

config interface 'vlan10'
   option device 'br-vlan10'
   option proto 'none'

etc
Note that all bridges tag packets onto eth0, and the device at the other end of the cable must be configured for the same numbers. Conventionally VLAN number 1 is used for the trusted LAN.

The other way is to use DSA type syntax. There is only one bridge, with all (one) of the hardware ports included in it. Then bridge-vlans exist inside that bridge. This configuration is portable to DSA switched hardware though the port names will likely need to be changed.

config device
   option name 'br-eth'
   option type 'bridge'
   list ports 'eth0'

config bridge-vlan
   option device 'br-eth'
   option vlan 1
   list ports 'eth0:t'

config bridge-vlan
   option device 'br-eth'
   option vlan '10'
   list ports 'eth0:t'

config interface 'lan'
   option device 'br-eth.1'
   ...

config interface 'vlan10'
   option device 'br-eth.10'

etc.

To attach wifi APs to the bridge, use option network with the interface name in /etc/config/wireless. This will be resolved back to the underlying bridge or bridge-vlan in either scenario.

In both cases every VLAN needs an Interface attached to it even if it is proto none (Unmanaged in the GUI) or the bridge will not be created.

Thank you for the reply and the solution!

I do have the following output now:

// cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdb8:a057:f91e::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.122.2'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.122.1'

config device
	option type 'bridge'
	option name 'Guest'
	list ports 'eth0.40'

config interface 'VLAN_Guest'
	option proto 'none'
	option device 'Guest'
	option defaultroute '0'

And when I connect a device to that SSID, I do indeed get an IP from the DHCP server I have in pfSense (192.168.40.100 in this case).

I do however think something might be miss configured since I can't reach anything from the WIFI even though I haven't set any blocking rules for the VLAN in the firewall rules as of yet.

I tried pinging 8.8.8.8 and I get a 100% packet loss.
If I however look in my firewalls system logs, I can see that it has passed.
image

Any idea on what can cause this and how I could troubleshoot this?

Thanks in advanced.

The last line (default route) is not required... delete it:

Have you verified that your main router is properly configured for this network? Specifically, do you have the ability to creat an access port on this VLAN such that you can connect a computer directly (via ethernet) and verify the behavior of this network?