[HOWTO] Captive portal + FreeRADIUS + local MySQL user friendly single step
-
@ardorin Strange, I actually developped this on french computers and did never get any trouble. What navigator do you use to check this ?
Also, can you try to add the following after line 327 ?
-
I tried adding that line and then in both Chrome and Firefox without any luck.
If I type any input in the HTML file with accents, it works, so the HTML header seems fine. The problem are the accents in the strings of the config file, for some reason they are not being coded correctly when introduced in the main file. Characters with accents are being replaced by a question mark.
I did edit your code a bit, but I didnt touch anything of the HTML part. -
@ardorin What platform are you running ?
I hope you didn't copy paste some of the code :)
Please check that all files are UTF-8 without BOM encoded. -
I edited the database part, so those changes I made should not be irrelevant (and that part is working perfectly)
Yes, every file is UTF without BOM encoded -
Dear, I have the problem "/index.php: Submission to captiveportal with unknown parameter zone:".
I got the newest files and still the error continues.
I looked over the correction post and I also could not solve it.
Home page opens to register the form and fell on a white page with the url: http://192.168.123.1:8002/index.php?zone=&redirurl=&language=en.
In the log the message "/index.php: Submission to captiveportal with unknown parameter zone:"
Can someone help me I'm out of ideas? -
@ardorin: out of ideas here. Have tested it on linux / windows, using various languages and systems. Didn't happen to me. Maybe start with a fresh install and try again ?
@Alexandre4sol: Are you running on 2.2 ? Cause zone parameter was introduced in 2.3. Also, what's your exact zone name ? -
@deajan: Hi, thanks for helping me out.
I'm using version 2.3.2-RELEASE (i386)
the captive portal zone is "guest"
This is the link to open the registration form. http://192.168.123.1:8002/index.php?zone=guest&redirurl=http%3A%2F%2Fwww.gstatic.com%2Fgenerate_204![Captura de Tela 2017-02-04 a?s 10.28.56.png](/public/imported_attachments/1/Captura de Tela 2017-02-04 a?s 10.28.56.png)
![Captura de Tela 2017-02-04 a?s 10.28.56.png_thumb](/public/imported_attachments/1/Captura de Tela 2017-02-04 a?s 10.28.56.png_thumb) -
@Alexandre4sol: I think dhipo on this thread did have the same error. Maybe you should talk to him to see how he managed to solve this. As for me I'll have to make some tests because I never encountered that problem.
-
Hi had issues with the one downloaded from git.
https://codeload.github.com/deajan/pfSense-cp-auth-onestep/zip/master
The old version worked fine but the new one didn't.
http://netpower.fr/sites/default/files/soft/bin/pfSense-cp-auth-onestep.gz
Fatal error: Call to undefined function mysql_real_escape_string() in /var/etc/captiveportal_wifi.html on line 35 Call Stack: 0.0002 226208 1. {main}() /usr/local/captiveportal/index.php:0 0.0170 1469432 2. portal_reply_page() /usr/local/captiveportal/index.php:288 0.0171 1469680 3. get_include_contents() /etc/inc/captiveportal.inc:1944 0.0172 1487664 4. include('/var/etc/captiveportal_wifi.html') /etc/inc/pfsense-utils.inc:2601 0.0277 1500240 5. cleanInput() /var/etc/captiveportal_wifi.html:45 PHP ERROR: Type: 1, File: /var/etc/captiveportal_wifi.html, Line: 35, Message: Call to undefined function mysql_real_escape_string()
-
@guterkerl That's why releases exist on github, in order to not pick up a project at a random moment in the dev process. You should take release v0.46 on github which is latest and functionnal.
-
oh ok thanks deajan
-
@deajan, I followed your instruction on PFS2.3.3 and it worked like a champ. I tried to customize to my enviroment and was wondering on I would change the font size of "Hotel WiFi"?
-
@probie Late reply, sorry. You can mod the text size directly in the css of ozy-captive.php. Find the line with```
.vertical-text -
Hi Deajan, Thank you for sharing your work.
My mistake I messed up mysql password during 'secure installation'.How can I reset it to carry on with your [How To]
Thank you again.
Krotin
-
@krotin google is your friend http://www.pastbedti.me/2008/11/resetrecover-mysql-root-password-in-freebsd/
-
Thank you, I know google is my friend but i'm not trusting every source granted i'm new to freebsd.
At least I know I can safely follow those instructions with your recommendations.
Thank you for your kindness Sir.
Krotin.
-
Hello. Is your work runnig both 32bit and 64bit platforms? Coz i noticed that some installation commands end with "amd64". So it means that installation package is for 64bit platform? When i wanna use 32bit platform do i have to use 32bit installion package?
-
Hi, I try to instal but when i try to instal mysql56-server, or mysql57-server go in conflict with the library libevent2-2.0.22_1 and libevent-2.1.8 in 64 bit version.
To no one else does the same?
-
I resolved the situation by using the development version 2.3.4-DEVELOPMENT (amd64), that does'nt have library conflict.
Also I have a problem with freeradius version 1.7.8 that don't allow to input into the interface the ip 127.0.0.1 so after installing freeradius I modificate the file /usr/local/pkg/freeradius.inc at line 4384 from
if (!is_ipaddr_configured($post['varinterfaceip'])) {
to
if (!is_ipaddr_configured($post['varinterfaceip']) && $post['varinterfaceip'] != "127.0.0.1") {
I found the information in tha post https://forum.pfsense.org/index.php?topic=127875.0
the last problem with freeradius version 1.7.8 is that need in the EAP section on "certificates for tls" all the voice with a hit
in the first you need to create a CA certificate, in the second a revacation list for the certificate and in the thir a ssl server certificate
Hi, I try to instal but when i try to instal mysql56-server, or mysql57-server go in conflict with the library libevent2-2.0.22_1 and libevent-2.1.8 in 64 bit version.
To no one else does the same?
-
Also I have a problem with freeradius version 1.7.8 that don't allow to input into the interface the ip 127.0.0.1 so after installing freeradius I modificate the file /usr/local/pkg/freeradius.inc at line 4384 from
if (!is_ipaddr_configured($post['varinterfaceip'])) {
to
if (!is_ipaddr_configured($post['varinterfaceip']) && $post['varinterfaceip'] != "127.0.0.1") {
I found the information in tha post https://forum.pfsense.org/index.php?topic=127875.0
Thanks for sharing. I have to setup a new pfSense test platform these days because of some changes I recently made on the mysql code. I'll update the howto then.