Captive Portal + Collecting Users Data for Marketing (Email, Phone Number, Name)
-
Hello! I'm new working with Pfsense and I've already set up my captive portal, but I need to make some adjustments which I don't really know if it's possible, so it'd be great if any of you could answer my questions.
I need my captive portal to deliver free internet conecction with no username or password, the client just needs to share the information I ask them in order to be registered in a mysql database. I've done this before using mikrotik and pointing to a web domain of my own, how would that work on pfsense or what are the requirements for it to work properly? Thanks for your help in advance!
-
Can it be done with the pfSense GUI, filling in some fields and done : No.
pfSense by default doesn't use or include MySQM (maraidb) support.
Although, as soon as you install (no need to use it) the pfSense Freeradius package, PHP MySQL client support will be loaded.Your question is known already, and there are answers, even solutions, just use the search button (look above) and search in the Captive portal forum the word MySQL.
It all boils down to : make your own captive portal login page, and upload it into pfSense.
Edit/modify the pfSense support 'code', PHP scripts actually, most probably /usr/local/captiveportal/index.php and /etc/inc/captiveportal.inc so you can 'get' to the records entered by the portal visitor, and do with them what you want, like : sending them to a mysql database.This :
Collecting Users Data for Marketing (Email, Phone Number, Name)
is of course forbidden in most civilized countries ;)
Most users that are willing to enter some information, will use fake names, phone numbers, mail address etc.
You could say : ok,; I'll send a sms with a random 6 digit code to the phone number, and the user has to use this code to validate the info. And the same thing for the entered email address, but at that moment, the user can't access his mail account as the portal isn't open yet.So, yes, of course, it can be done.
The question will change very soon : are you willing to do this ? Support this ?