Netgate SG-1000 microFirewall

Author Topic: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step  (Read 41273 times)

0 Members and 2 Guests are viewing this topic.

Offline rudat

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
« Reply #135 on: November 01, 2017, 10:10:51 am »
I'm running the latest version of pfsense with freeradius3
I followed every detail in the guide but I still cant manage to make everything work.

I did try what user "srvrgt" suggested except changing the "==" to ";=" resulted in having an attribute error. ( I left the schema file as it was "==")
I've only changed the password value to cleartext-password in the php file.

Now I am facing 2 issues.

1. Whenever a client connects and fills in the form the user gets created in sql but somehow it is not showing up on radius clients tab.

2. When a client submits the form they first get redirected to the new captive portal after clicking the accept button the default pfsense captive portal comes on with the error code that username/password is wrong however
authentication for user testu:testp works because it is in the clients tab on radius

If someone could help me that would be great!
Thank you in advance


I used the version form v0.48 - 03 May 2017
download from  https://github.com/deajan/pfSense-cp-auth-onestep

Offline rudat

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
« Reply #136 on: November 01, 2017, 04:34:12 pm »
heyy guys, first of all thank you Deajan for the amazing work, really, it helps alot, now to my problem, i am currently on pfsense 2.3.4, and everything seems to be working fine except for the radius login part, i can see the users in the MYSQL database but they are all Rejected, the configuration of the ports on the radius server is ok, i was able to find this in the logs

 "Invalid user (sql1: Failed to create the pair: Invalid vendor name in attribute name "Password"): [123] (from client tester port 2010 cli "

i believe from what ive read that there is no such thing as apassword atribute, it must be Cleartext-Password, the problem is that i cant seem to find where to change the value, could you please help me out?,   

FYI if i use the test user and test password i can log in no problem and the mysql database also reflects that, so im guessing its just some sintaxis problem.

thanks

Do you found a Solution?

Offline retestreak

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
« Reply #137 on: November 02, 2017, 02:18:02 am »
heyy guys, first of all thank you Deajan for the amazing work, really, it helps alot, now to my problem, i am currently on pfsense 2.3.4, and everything seems to be working fine except for the radius login part, i can see the users in the MYSQL database but they are all Rejected, the configuration of the ports on the radius server is ok, i was able to find this in the logs

 "Invalid user (sql1: Failed to create the pair: Invalid vendor name in attribute name "Password"): [123] (from client tester port 2010 cli "

i believe from what ive read that there is no such thing as apassword atribute, it must be Cleartext-Password, the problem is that i cant seem to find where to change the value, could you please help me out?,   

FYI if i use the test user and test password i can log in no problem and the mysql database also reflects that, so im guessing its just some sintaxis problem.

thanks

Do you found a Solution?

Thanks for the help :)

I've changed the Cleartext-password atribute in the schema.sql to ":=" and I had to enter my database password in the captive portal setting. Now everything works great.

Offline doken1313

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
« Reply #138 on: November 27, 2017, 03:49:22 am »
Absolutely amazing work! Congratulations to all of you that made this system.

However I had some issues from users registering with emails with no valid domains (no mx records at all) so I am posting an addon for all of you that  want to avoid this :

Add a new error message in captiveportal-config.php like
Code: [Select]
$novalidmail_string = "The input you provided is not a valid email.";
or whatever you want to appear there and make your ozy-captive.php look like this (lines 105 - 117)
Code: [Select]
if (isset($_POST['emailAddress']))
{
$emailAddress = cleanInput($_POST["emailAddress"]);
$record = 'MX';
list($user, $domain) = explode('@', $emailAddress);
}
else
$emailAddress = false;
if (!checkdnsrr($domain, $record)  && ($askForEmailAddress == true))
{
$checkMessage = t('novalidmail_string');
$badCheck = true;
}

Once again great work !

Offline darkiazz

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
« Reply #139 on: December 08, 2017, 08:25:33 am »
Hi guys !

I've a problem with pfSense 2.4.1 and this solution..

I've 'Invalid creditential specified' and in the system logs 'failed retrieving values required to evaluate condition'.

Do anyone can help me ?

Thanks you