freeradius first hour free ???

Fajar A. Nugraha list at
Mon Dec 26 12:41:47 CET 2011

On Mon, Dec 26, 2011 at 3:53 PM, backghost <mikoletic at> wrote:
> i just wana to make all my new users, to have first hour free to use
> internet, and when the hour exceed then the pfsense captive portal popup.

Short version: hire an expert. Seriously.

Long version:
What you want SEEMS easy, but it requires several piece of software
which you need to understand. Your post indicates you master none
(hopefully I'm wrong on this). Here's some logical flow of how things
should work which might help you later. Note that you'll have to find
out yourself how to implement them, or hire an expert.

(1) You can use client MAC address as identifier, to determine whether
it's the same client or not.
(2) Create a web page for the captive portal using php (or whatever
your favorite is). It needs to be on the same LAN as the user's
(3) Create a script so that the web page can detect user's MAC address
(might involve some "exec" to run "arp", hence the requirement of
being on the same LAN).
(4) The page then checks whether the MAC is already in database. If it
does, it has already used its free allocation. In this case simply
display a normal login page.
(5) If the MAC is NOT in database, generate an user entry in FR's db
with session-timeout one hour (or whatever you choose). Redirect to
the NAS (e.g. chillispot) with the username/password that you just
generated. That way new users can go to the web page they want for one
hour without having to type user/password manually.
(6) If you want the "free" session to repeat (every
day/week/whatever), then setup a schedule job that will delete the
automatically-generated entries.


More information about the Freeradius-Users mailing list