Security

 View Only
  • 1.  Captive portal on open Wifi

    Posted May 18, 2020 08:14 PM

    Hello,

     

    We've got a customer that is using CCPM. We've got a new open wifi network.

     

    Is there a way for the users to be directly redirected to the captive portal (https://cppm.customer.com/guest/portal_login.php) instead of the welcome url (https://cppm.customer.com/tips/welcome.action) ?

     

    Thanks!



  • 2.  RE: Captive portal on open Wifi

    Posted May 18, 2020 10:15 PM
    You can change it under Administration > ClearPass Portal



    Thank you

    Victor Fabian

    Pardon typos sent from Mobile


  • 3.  RE: Captive portal on open Wifi

    Posted May 18, 2020 11:49 PM

    Hello,

     

    Thanks for the answer. I saw this option but the customer has multiple captive portals.

     

    I'm looking for an option (like in Aruba in the SSID definition) to specify the captive portal depending on the source device or IP, but directly on the CPPM.

     

    The new AP are Ubiquiti and you cannot specify the full URL in the controller. So I'm looking for an alternative with an opened network.



  • 4.  RE: Captive portal on open Wifi
    Best Answer

    Posted May 19, 2020 04:55 AM

    I did some testing and think that I found a working solution with the help of this and this page.

     

    You can create a Web login page and put in the header the following code:

    {if $smarty.server.REMOTE_ADDR|substr:0:10 == "192.168.1."}<meta http-equiv="refresh" content="0;url=http://google.com"/>{/if}
    {if $smarty.server.REMOTE_ADDR|substr:0:12 == "192.168.251."}<meta http-equiv="refresh" content="0;url=http://microsoft.com"/>{/if}
    <meta http-equiv="refresh" content="0;url=http://arubanetworks.com"/>

    This will take the client IP ($smarty.server.REMOTE_ADDR) then take the first 10 characters from it (in the case of 192.168.1.10 that will be 192.168.1.) and compare that to a string "192.168.1."; if that matches, a meta refresh will be outputted that redirects the client to a specific URL. In the example that is Google, in practice you will put the URL of your guest page for the 192.168.1.x subnet. Similar all clients in 192.168.251.x will go to microsoft.com (or your second guest page). If none matches, it will redirect to arubanetworks.com.

     

    For testing, you can put in the code block for example:

    {$smarty.server.REMOTE_ADDR}<br>
    {$smarty.server.REMOTE_ADDR|substr:0:16}<br>
    {'192.168.1.10'|substr:0:10}<br>
    {'192.168.251.32'|substr:0:12}<br>

    to get the client IP, then the client IP truncated at 10 characters, and then an example address truncated at 10 characters and one truncated at 12 characters.

     

    You can clean the footer/login message if you like.

     

    Would this solve your request?



  • 5.  RE: Captive portal on open Wifi

    Posted May 19, 2020 08:00 PM

    Thanks for this very complete solution. I'll give you a feedback.