Not able to connect to unifi wifi that is connected to pfsense (SOLVED)

I cannot get a connection to wifi, I get connection failed.

I have a pfsense firewall running on a protectlii vault mini pc.
This is connected to a TP-Link TL-1016PE managed switch.
I have a Unifi UAP-AC-=PRO AP connected to the TL-1016PE switch.

I have the following configured in Pfsense:
LAN with IP 10.99.20.0/24 with gateway 10.99.20.1
VLAN 40 set with IP 10.99.40.0/24 with gateway 10.99.40.1
VLAN 50 set with IP 10.99.50.0/24 with gateway 10.99.50.1

Parent of both VLANs is LAN on igb1

I have firewall configured on all three interfaces, but have disabled all the rules on LAN and VLAN 40 for testing.

I have the unifi controller versions 8.0.26 installed and have the following configuration

Under System>Advanced I have turned off Wireless Connectivity.
I have VLAN 40 and VLAN 50 networks configured, both with Third Party Gateway.
I have wifi set up for both VLANs networks.

I can access the pfsense UI and the switch UI on the 10.99.30.x IP
The AP gets the static IP I assigned and I can ssh into that AP.

When I try to connect my phone to the LAN 40 Wifi SSID it shows connecting, and I can see my phone in the clients tab of the Unifi controller.
But is will show connection failed.

I never see anything in Pfsense DHCP status for the phone.
I also do not see the switch IP listed in the DHCP status. I do see the AP IP in there but not the switch.

I am sure I have a setting wrong somewhere but I have not been able to find it.
Looking for help on what else to check to resolve this issue.

The prerequisites are as follows.

  1. Pfsense has the VLAN configured properly with the proper DHCP configured and tested

  2. The UniFi switch has the VLAN configured in the networks tab with the proper VLAN ID

  3. You have a trunk port going from the switch to you UniFi AP

So the issue is with the TP-Link switch
I plugged the AP directly into the portectli vault and I can connect to the wifi without issue.

So in the TP-Link I don’t have an option for TRUNK port.
If I enable VLAN, then I have to assign the LAN connection port and the AP port to all the VLANs I have set up.
Once I did that I can now connect to the all the Wifi SSID I have set up.

1 Like