Captive portal with external database
-
Hi,
Is it possible to configure captive portal to work with External Database,
to use another authentication form (i.e; Room and Name). -
@moelharrak hi
Yes : You could set up an external radius server (such as freeradius), which itself would rely on a database for authenticating users.
-
Thank you for your reply ,I don't want to use RADIUS , is that possible ?
-
@moelharrak said in Captive portal with external database:
I don't want to use RADIUS
Then there is no solution at this moment.
Still, it is possible, and boils down to one thing : how good are your programming skills ?
But I guess, if you were able to do so, you would already have found out pfSense can use the build in data base, or an external database, through FreeRadius package. All this is explained in the Manual.
Up to you to code against any type of database you want. You will be you're own limitation. -
@moelharrak no. It's curently not posdible
But i don't understand why that would be needed.
Radius is an authentication server, it's really designed to perform the job... -
I'm just asking if there is a limit with pfsense or it's open source and as you said depending to our own limitation.
I'm just asking if it's possible and the dev team will do that:- As a first step connect the portal to and external database.
- Second connect the database to a PMS and informations that come from PMS like (Name/Room number/ checkout data,...) will be stored in the database and use it as authentication.
-
You said it :
@moelharrak said in Captive portal with external database:
it's open source
this means that everybody can add whatever is needed.
@moelharrak said in Captive portal with external database:
the dev team will do that
Thousands will have to ask for a new possibility, and they'll code it up.
@moelharrak said in Captive portal with external database:
connect the database to a PMS and informations that come from PMS like (Name/Room number/ checkout data,...)
I've done EXACTLY that in the past.
As I'm using a 'PMS', and sitting right now now in what's called the reception of a hotel.
The database in question was a MSSQL running on an (now retired) 2008R2. The PMS in question was closed source, but the MSSQL server credentials were easy to fine.
With some reverse engineering, I was able to build the 'logic' that detects if a room is occupied, not checked out, and generate / assign a password. It worked pretty well.
All what was needed what the PHP MySQL extension and some code.But, there was a but.
The conditions for the "Wifi-by-Hotel" access is and was : it's free **, if you "manage to connect yourself". So, it wasn't worth it to modify the pfSense source as these modifications have to be re implemented every time an pfSense update is applied.
As I prefer security above comfort, I decided to go for a much simpler system : the login user name is the 3 digit room number as clients can find number easily ( ;) ). The password is shown in the Room directory in the room (before Co..19 days) . I actually show the password now on the Captive portal's login page ( !!) (and still people call the reception for the password ...)** as the hotel has 4G (soon be be 5G coverage).
-
@gertjan Thank you very much for your reply and information, That is really cool what you did. I hope we can do something with it too.
-
@moelharrak Been doing this for quite a while now. pFsense Captive portal with freeradius authentication and MySQL as backend database. What I did was modified our PMS System (Hotel software that we created) to insert into the radius schema the needed information so that guest can authenticate to when connecting to the wifi. In this case I decided to use the Room number as the username and the last name of the guest as the password.