Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step

    Scheduled Pinned Locked Moved Captive Portal
    154 Posts 47 Posters 107.5k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GertjanG Offline
      Gertjan
      last edited by

      @Darlene:

      please how do u edit and enter the code?

      Using a keyboad and your hands ?!

      Of course, a more specific answer is possible as soon as we know what kind of device you use.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • M Offline
        mansoor.khan
        last edited by

        Hello,

        I am facing problem in login page from Captiveportal.

        I am using the default login Form Html code with Form action 'action ="$PORTAL_ACTIONS"' and still I am continuously getting Access-Reject message in Mysql table 'radpostauth'.

        I am using Pfsense 2.4.2 with freeRadius3 pakage and mysql Server 5.6.39.

        When I create user from Captiveportal -> Users login page works fine then. Also with NO authentication login page is working.

        But I need this with Mysql database authentication.

        Did anyone face problem like this? If you have solution in mind please let me know.

        Thanks in advance

        M 1 Reply Last reply Reply Quote 0
        • O Offline
          Ophion
          last edited by

          Great work! Appreciated.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Darlene
            last edited by

            Please how do you edit those files you mentioned earlier

            1 Reply Last reply Reply Quote 0
            • GertjanG Offline
              Gertjan
              last edited by

              @Darlene:

              Please how do you edit those files you mentioned earlier

              Who is you ?
              What file ?

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • P Offline
                pama
                last edited by

                Please help, I am not able to install mysql…how can you get it working? Thank you

                1 Reply Last reply Reply Quote 0
                • C Offline
                  caraffandee @srvrgt
                  last edited by

                  @srvrgt said in [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step:

                  FOLLOWUP, in case anyone is hitting the same problem as me, the problem is with freeradius3, so first of all you need to change the attribute type on the file ozy-captive :
                  From :    “INTO radcheck (username, attribute, value) VALUES (?, ‘Password’, ?)”)) "
                  TO:  INTO radcheck (username, attribute, value) VALUES (?, ‘Cleartext-Password’, ?)"))
                  And then you need to change the file    Schema.sql  BEFORE you add it to the radius database
                  FROM:
                  CREATE TABLE radcheck (
                    id int(11) unsigned NOT NULL auto_increment,
                    username varchar(64) NOT NULL default ‘’,
                    attribute varchar(64)  NOT NULL default ‘’,
                    op char(2) NOT NULL DEFAULT ‘==’,
                    value varchar(253) NOT NULL default ‘’,
                    PRIMARY KEY  (id),
                    KEY username (username(32))
                  ) ;
                  TO:
                  CREATE TABLE radcheck (
                    id int(11) unsigned NOT NULL auto_increment,
                    username varchar(64) NOT NULL default ‘’,
                    attribute varchar(64)  NOT NULL default ‘’,
                    op char(2) NOT NULL DEFAULT ‘:=’,
                    value varchar(253) NOT NULL default ‘’,
                    PRIMARY KEY  (id),
                    KEY username (username(32))
                  ) ;
                  I hope this helps anyone  My problem was with pfsense 2.3.4  FRERADIUS 3

                  Hi, @deajan, hi @rudat . I can confirm @srvrgt post. I've used the base work to setup a small captive portal in a hotel. Everything used to worked great until I upgraded to the latest version of pfSense/OzyCaptive-single-step. It stopped working. After modifying the table structure as per srvrgt advice, everything works flawlessly again.
                  I think you should update your code in the project repo, specifying that your latest version requires pfSense 2.4.3/freeradius3.
                  Thanks everybody for the outstanding work!

                  P.S.: Does anyone know a simple way to limit bandwidth on per-user basis? (something like this -obviously fictional -

                  INSERT INTO radcheck (id, username, attribute, op, value) VALUES (NULL, ‘Eleonor’, ‘Max-Input-Bandwidth’, ‘<=’, ‘5242880’);
                  
                  1 Reply Last reply Reply Quote 0
                  • O Offline
                    OKODA @deajan
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      Marcus Vinicius @mansoor.khan
                      last edited by

                      @mansoor-khan Hi mansoor!!! i setted up everything in captive portal + FreeRADIUS + mariadb (mysql) but I got the same problem trying log on Captive portal page, and mysql reports me (Access-Reject) too after type mail and name on the box.

                      Did you or someone got this problem already solved?

                      Thank you Guys

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        Nova9
                        last edited by Nova9

                        [removed]

                        F 1 Reply Last reply Reply Quote 0
                        • F Offline
                          free4 Rebel Alliance @Nova9
                          last edited by

                          @Nova9 php 5.6 is outdated and full of vulnerabilities on pfsense

                          pfsense is now running php 7...

                          as for your CSS ...this is a pfSense forum, not HTML one :'( we could try to help you debugging your page, but we need the associated HTML to help you

                          N 1 Reply Last reply Reply Quote 0
                          • N Offline
                            Nova9 @free4
                            last edited by Nova9

                            [removed]

                            GertjanG 1 Reply Last reply Reply Quote 0
                            • GertjanG Offline
                              Gertjan @Nova9
                              last edited by

                              @Nova9 said in [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step:

                              Maybe the .js files aren't loading properly?

                              Use the right button of your mouse.
                              Every browser will give you the possibility to see the 'html source of the web page.
                              You'll be seeing in a split second if resource files like css and js files are not load, most of the time because they have another file on the system name.

                              Btw : The subject "Captive portal + FreeRADIUS + local MySQL user friendly single step:" is a rather big project.
                              Nothing something that can be pulled of 'ASAP'.
                              Using an old pfSense version gives you a new feature : you created a security time bomb.

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              1 Reply Last reply Reply Quote 0
                              • J Joseguadalupe referenced this topic on
                              • J Joseguadalupe referenced this topic on
                              • N ngpfpeter referenced this topic on
                              • GertjanG Gertjan referenced this topic on
                              • D Dmc referenced this topic on
                              • D Dmc referenced this topic on
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.