Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

Sonicwall NSa 3650 Captive Portal Authentication

Hi team;

i making captive portal authentication with radius server but i need the basically html form post to captive portal authentication

Can you share a simple example?(Html or php or python)


Category: High End Firewalls
Reply

Answers

  • SaravananSaravanan Moderator

    Hi @ERCAN,

    Thank you for reaching out to SonicWall Community.

    Yes, we have some pre-defined HTML scripts available within the SonicWall for custom user authentication pages. Below provided KB article can help you choose the HTML script.

    Note: When login page is customized without appropriate design, it will result in Users not able to access the Management GUI of the SonicWall security appliance. The below KB article explains how to reset the Management GUI back to default HTML script and how to access default management GUI at the time of the issue.

    Have a good one!!!

    Regards

    Saravanan V

    Technical Support Advisor - Premier Services

    Professional Services

  • ErcanErcan Newbie ✭
    Hi you misunderstand this just customization sonicwall template but
    i have external template i just want external guest captive portal to device posting no have anywhere documentation
  • SaravananSaravanan Moderator

    Hi @ERCAN,

    As per your description, it seemed like you were looking for some sample HTML scripts that you wanted to enforce to users using Captive Portal. Hence I proposed a KB article that has few examples about the HTML scripts for various user login's and thought it may help you. Is this right? Please correct me if I'm wrong.

    (or)

    Are you looking to incorporate your external template in the Captive Portal Authentication settings in your NSa 3650 appliance? I really apologize for misunderstanding.

    Please let us know. We can guide your accordingly.

    Regards

    Saravanan V

    Technical Support Advisor - Premier Services

    Professional Services

  • ErcanErcan Newbie ✭

    yes @Saravanan i explain you

    i use external guest authentication this is sample code but i posting manuel sessionLifetime and idleTimeout

    i dont want post manuel please check picture

    i wanna use sessionLifetime and IdleTimeout from radius server but i dont know how is posting this code working with captive portal authentication

    $path = 'https://' . $device_ip . ':' . $port . '/externalGuestLogin.cgi';

        $posting_data = http_build_query(

          array(

            'sessId' => $sessionid,

            'userName' => $username,

            'sessionLifetime' => $sessionlifetime,

            'idleTimeout' => $idletimeout

          )

        );

        $options = array('http' =>

          array(

            'method' => 'POST',

            'header' => 'Content-type: application/x-www-form-urlencoded',

            'content' => $posting_data

          ),

          'ssl' =>

            array(

              "verify_peer" => false,

              "verify_peer_name" => false,

            ),

        );

        $post = stream_context_create($options);

        $result = file_get_contents($path, false, $post);

        $res = simplexml_load_string($result);

        $json = json_encode($res);

        $array = json_decode($json,TRUE);

        $results= $array['AuthenticationReply']['ResponseCode'];

        return $results;


  • SaravananSaravanan Moderator

    Hi @Ercan,

    Thanks for explaining the requirement in detail.

    It seems like you are indeed using RADIUS server for Captive Portal Authentication so the login page or authentication page will be fetched from the RADIUS server. To be precise, we have only few sample HTML codes that are given in the prescribed KB article on our previous comments. But to give you some directions or guidance, I spent some time and did a bit of research on this topic.

    It looks like, for setting up session timeout options we have to use PHP codes or Javascript. HTML cannot be used as it is not capable of understanding session variables directly. I found that the below web-link provides an example PHP code to setup an authentication page with session timeout values on it.

    Though this web-link is not SonicWall propitiatory but at-least it can provide you some insight with creating login page using PHP.

    Hope this helps.

    Regards

    Saravanan V

    Technical Support Advisor - Premier Services

    Professional Services

  • ErcanErcan Newbie ✭

    Hi @Saravanan i'm software developer i know exacly more programming language but i need the parameter i dont know device parameter

    i hope you understand me

  • SaravananSaravanan Moderator

    @ERCAN - It would be better to get this addressed over phone. Please contact our Support Team using below URL link for a real-time discussion on this.

    Regards

    Saravanan V

    Technical Support Advisor - Premier Services

    Professional Services

  • prestonpreston All-Knowing Sage ✭✭✭✭

    @ercan, I have the SW LHM PHP samples if that's any use, I can email them to you

Sign In or Register to comment.