Tuesday, October 10, 2017

Unifi Guest Portal issues

@bravonoj And a few more tests for you to try:
1. Make sure DNS works on the client. Use `nslookup www.ubnt.com` and see if you get an IP. If you use a hostname for the portal, `nslookup <hostname>`. If that doesn't work, then the AP has the wrong DNS settings as it intercepts the DNS requests.
2. From the guest, manually browse to `http://<controller_ip>:8880` You should see some HTTPS Status 400 page mentioning Apache Tomcat at the bottom. If this page doesn't load, than the firewall is blocking port 8880 to that IP somewhere.
3. If you use hostnames, replace `<controller_ip>` above with the hostname. If the DNS lookup works, and 2. works, then this should work. If not, DNS doesn't work

---

I have an interesting issue with the captive guest portal that nobody can seem to figure out.

In a nutshell, the guest network is segregated from the rest of the network for good reason - we are highly regulated and don't want the guest traffic touching the production network.  The guest network that we will be using is 172.16.48.0/16 (DHCP leases are set to expire every 2 hours).

The unifi controller lives on the INTERNAL network, as do the management IPs of the APs.

So far so good.  We made the controller 'aware' of the internal VLAN structure we already had in place on our core (Cisco 6509E) and each SSID connects, gets proper IP/Gateway/DNS info, and all is well.  Tried this with each of the 6 total SSIDs we may be using (in two WLAN groups).

THEN...catastrophe struck.  I tried to set up the Captive guest portal so that there needs to be a TOS acceptance, and we redirect to one of our internal sites.  We can not get this to work on the guest network at all.

I set up two guest SSIDs - below is a detail of what went down:

1) GUEST_PORTAL:  No authentication, captive portal ENABLED.  Redirect to our site.  All set ok.  Laptop client can connect successfully to the SSID, then tries to load the captive portal page.  No dice.  I remembered that the firewall is segregating the networks, so I put a rule in to allow the /16 gest network access to the controller on our internal server VLAN.   We noticed that once the client connected, it can not ping the gateway (although it recieves one as seen when running ipconfig /all command), and from the controller or even the firewall (which can ping anything) we can not ping the client laptop at it's given IP address.

2) GUEST_NO_PORTAL:  We set this SSID up as a test.  Exact same settings, but no guest portal enabled on this Wireless network.  Client gets same IP/GW/DNS info via DHCP, but this time can ping the gateway and from the firewall, we can ping the client.

In the firewall, where I inserted the rule to allow communications between the guest subnet and the unifi controller, I can see hits realtime on the rule, which means it is trying to get through.  Yet the browser returns an error that the site took too long to respond, so it gives up.

Using the GUEST_NO_PORTAL to connect and being able to ping, communicate, etc to each other tells me that our networking is sound, and there is no issue there.

Once I introduce the portal, that's when the issues start.

I realize that most folks might not use this as their setup, but we need to.  Could there be something else that we need to do on the controller to allow the client to access the gateway?  Without that, it will never get to the controller to load the captive portal page.


As one last test, we connected the client to the SSID *WITH* the portal, let it begin to try and load the portal page - and fail - but during the portal access time in the browser, we connected an ethernet cable to the laptop on the internal network, and the portal loaded fine.  Once we accepted on that portal, unplugged the ethernet cable, we were on the guest network and able to browse with no issues.

Something is going on with the portal in terms of access, that is preventing it from reaching the internal network and it isn't our routing or firewall.  Can you or someone help me get this going?

My other option was to put the second NIC card of the controller on the guest VLAN, but I am told the portal page can only be served up from the main NIC IP address of the controller.

Any advice?  I know that was long winded...

No comments:

Post a Comment

Juniper EX-3400 VC

Easiest way to stack two EX3400's is make sure they are on the same code level. Then connect them using the QSFP+ ports. Boot the master...