OPNsense Forum

English Forums => General Discussion => Topic started by: erktrek on December 13, 2018, 05:58:06 pm

Title: Advice on captive portal approach ideas..
Post by: erktrek on December 13, 2018, 05:58:06 pm
I guess what I am after is managing users and access remotely via a website that's not the Opnsense gui. Captive portal / Guest network Hotel scenario seems ideal but how do I control the users via a backend process instead of through the gui? configctl?

The scenario - user registers via my website and requests a certain amount of time. website passes credentials to a server that then ties in with the captive portal. When the user connects to my network via wifi (or hardwired) a portal login pops up. Using their user/password they get access. System keeps track of their usage and when time limits up they get logged out and their credentials no longer work until they request more time.. the key here is the website (or more likely an intermediate RESTful server) handles the configuration/setup so I don't have to deal with each user and manually configure/update each time.

Does this make sense?

My first thought was using a separate FreeRadius server with a SQL backend - can add/remove/read records directly but not sure how that ties in with the captive portal.

Another thought was some sort of ssh hook into opnsense via configctl - managing users/vouchers as needed.
Title: Re: Advice on captive portal approach ideas..
Post by: erktrek on December 15, 2018, 02:28:06 pm
So I may have been over thinking this..

I wonder if I can simply use the captive portal via the api (or configctl) to create a ticket/voucher for a given user programmatically.

That way I can have my user DB with time allowed stored on a separate computer with different logic.

The only issue is extracting the time used/remaining.
Title: Re: Advice on captive portal approach ideas..
Post by: erktrek on December 15, 2018, 02:36:25 pm
Ahh slowly I am beginning to understand how captive portal works..

So the system generates the vouchers ahead of time. I can't really control this by adding my own I guess.

Title: Re: Advice on captive portal approach ideas..
Post by: erktrek on December 15, 2018, 06:49:00 pm
Now my idea now is to use captive portal + an openLDAP server for authentication. My thinking is I can control the users as needed via a script/program at the LDAP server.

Does anyone see a problem with this? Can I still get logged in time etc?