Unifi Controller integration

Ubiquiti UniFi Cloud Controller

Ubiquiti UniFi Cloud Controller

This article describes the installation and configuration steps for Ubiquiti UniFi Cloud Controller in Legacy mode. Instructions in this guide are only for older UniFi controllers with Legacy mode and shouldn’t be used for new setups. Our test was performed with Unifi controller 6.4.54 and Unifi AP-AC-Lite firmware version 6.6.55.1589

(the previous tests were performed with controllers v5.9.29, v5.10.23.11668-1, v5.11.50, v5.13.32, v5.14.23.0 and Unifi AP-AC-Lite firmware v4.0.54.10625, v4.0.9.9639, v6.5.28.14491. Some Unifi controller versions don’t work (like 6.0.45.0), so please use v 6.4.54)

Connecting


Log in to your UniFi controller and click the Settings icon.


Go to the Site page and click Apply changes.

Create a Wireless Network that will be enabled for Guest Access.



Go to Settings / Wireless Networks, click Create New Wireless Network and configure following:


Name/SSID: Your SSID ( it’s your choice what will be set as SSID Name, Guest WiFi in our case)                                             
Enabled: Enabled
Security: Open
Guest Policy: Enabled

Click Advanced Options and from the Radius MAC Authentication section, change the MAC Address format to AA-BB-CC-DD-EE-FF and save changes.



Go to the Guest Control page and in the Guest Policies section, set following:


Enable Guest Portal: Enabled                                                                                                                                                                           
Authentication: Hotspot
Default Expiration: 8 Hours
Landing Page: Promotion URL – insert desired URL                                                                                                                        
Use Secure Portal: Disabled
Redirect using hostname: Disabled
Enable HTTPS Redirection: Disabled
Enable encrypted redirect URL: Disabled

On the Portal Customisation section, as Template Engine, set Angular JS and enable Override Default Templates.


Later, when you change the index.html and auth.html files, the Desktop preview will change to:


In the Hotspot section, enable Radius-based authorization



Override Default Template should be disabled in the Voucher Customization section.

On the RADIUS section under Profile, click the Create new RADIUS profile button or select the previously created RADIUS Profile and configure the following:
As the Authentication type, choose CHAP.
Accept incoming disconnect request: DISABLED

(Check the Configuring parameters section to learn how to create a new Radius profile)

On the Access Control / Pre-Authorisation section, enter the Walled Garden IPS.

connect.socialwifionline.com
connectwifi.cloud   
IP Address: 192.250.224.84                                                                                

Always whitelist all the Social sites as described here​. Please scroll down to the bottom and whitelist all.                                                


Configuring Parameters


Go to the Profiles Radius section and click the Create new RADIUS profile button.
Click Create New RADIUS Profile and configure the following:



Profile Name: SocialWiFiOnline                                                                                                                                                                 
RADIUS Auth Server: 192.250.224.84
Port: 1812
Password / Shared secret: (contact our office)
Click Add Auth Server and configure Radius server 2:
RADIUS Account Server: 192.250.224.84
Port: 1813
Password / Shared secret: (contact our office)
Interim update: Enabled
Interim update interval: 86400                  

Save changes.

If you want to enable the Social network login feature or use PayPal as a payment gateway, add further IPs as per below for each network you plan to support.


Ultimately, you will need to modify two HTML files on the controller to ensure it correctly redirects and authenticates.                     


Last, crucial step:
Download this file and unzip its contents (index.html and auth.html) it into your app-unifi-hotspot-portal directory
Depending of the OS, it is usually located at the location below:


Windows: C:\Users\\Ubiquiti UniFi\data\sites\default\app-unifi-hotspot-portal
MAC: ~/Library/Application Support/UniFi/data/sites/default/app-unifi-hotspot-portal                                                                  
Linux: /usr/lib/unifi/data/sites/default/app-unifi-hotspot-portal
UDM Pro: /data/unifi/data/sites/default/app-unifi-hotspot-portal
If you are using Cloud Key, please upload our index and auth files into the appropriate site folder. By default, it’s:
/srv/unifi/data/sites/default/app-unifi-hotspot-portal                                                                                                                           

 Troubleshooting

Having troubles? Here is a quick checklist:

1. Make sure that you selected CHAP and not MS-CHAP

2. Make sure that you have replaced the index and auth files.
– If the local controller installation files are on your computer. See paths above.
– If it’s Cloud Key installation, upload these files into the appropriate folder
– If it’s Hostifi, send your files to the admin to replace the original ones.

3. Make sure that you typed the AP MAC address into our cloud portal

4. If the mobile device you are testing is not reaching our Hotspot splash page, but instead you receive ERR_CONNECTION_REFUSED with an address like http://yourpublicip:8880/guest/s/…, please ensure that your Access Point (AP) can access the machine where the controller is hosted. If it’s your personal computer, perform port forwarding, unblock the firewall, etc.

5. Ensure that you match the exact model of your AP. In some cases, mistakes are not obvious, for example:



6. Client MAC is not received

If you are getting the splash page but cannot log in and receive an “Invalid password” or other error, please check if the AP is sending the client MAC address.
Some versions of UniFi AP firmware are buggy and do not send the client's MAC address.
In such a case, downgrade the AP firmware to the earlier version.
At the time of writing, a downgrade from v4.3.20 to v4.0.54 resolved the issue.



If your attempts to downgrade via web links (SSH or UniFi Controller) continuously fail, please follow these steps: SCP into the AP, copy the firmware file to /tmp, then SSH in and run the command.

7. Make sure that you have configured the Ubiquity AP (Unifi Controller) when you deploy APS with the controller.



8. If you get a URL similar to this one on the client device ( IP address instead of connectwifi.cloud domain)

http://192.168.1.7:8880/guest/s/default/?ap=b4:hg:04:73:de:8f&id=01:37:10:98:12:44&t=1597065764&url=http://www.msftconnecttest.com%2fredirect&ssid=UnifiGuest

It means that the controller has not started or there are no communications between the controller and APs.

9. SSID name should contain only letters and numbers—don’t use spaces or special characters, such as !, @, #, $, ?, *, ‘,-, etc.

10. If you get the message WiFiAccessDenied WelcomePage.FailedInternal
Ensure that, as a Hotspot Model for all APS on the selected WiFi location, you use Ubiquiti AP (UniFi Controller) instead of Ubiquiti AP (Firmware).

Note that Ubiquiti UniFi doesn’t control bandwidth data limit transfer. Ubiquiti Unifi allows control only of the session time but it doesn’t control bandwidth quota limits.


    • Related Articles

    • Grandstream GDMS Cloud

      This article describes the installation and configuration steps for Grandstream GDMS Cloud devices. Connecting Log in to your Grandstream Cloud account at https://www.gdms.cloud/gwn Go to Settings / Wi-Fi and configure: WiFi: Enabled SSID: GuestWiFi ...
    • TP Link Omada Controller

      This article describes the installation and configuration steps for TP-Link Omada Cloud-Based Controller. You will need Omada Controller v5.3.1 or above in order to proceed. Our test was performed with Omada Cloud controller v5.9.41. CONNECTING Login ...
    • Ruckus Virtual SmartZone

      Ruckus Virtual SmartZone This article describes the installation and configuration steps for Ruckus Virtual SmartZone controller. Our test was performed with controller version 3.6.2.0.222, Control Plane Software version 3.6.2.0.63, and AP Firmware ...
    • Aruba Central

      This article describes the installation and configuration steps for Aruba Central. Our test was performed with Aruba AP-303-RW. Aruba Central Log in to your account using the Aruba Central portal. From the menu on the left, under Wireless ...
    • Cambium

      This article describes the installation and configuration steps for Cambium APs. Our test was performed with cnPilot e410 and cnPilot e600 devices. Connecting Please reset the Cambium access point to factory settings to avoid problems with some ...