pfSense – Captive Portal

12:05 pm Uncategorized

To have reusable vouchers:

Edit /etc/inc/captiveportal.inc and modify:


/* This user was already logged in so we disconnect the old one */
captiveportal_disconnect($cpentry,$radiusservers,13);
captiveportal_logportalauth($cpentry[4],$cpentry[3],$cpentry[2],"CONCURRENT LOGIN - TERMINATING OLD SESSION");
unset($cpdb[$sid]);

with:


/* This user was already logged in so we disconnect the old one */
if (isset($config['captiveportal']['noconcurrentlogins']))  {
captiveportal_disconnect($cpentry,$radiusservers,13);
captiveportal_logportalauth($cpentry[4],$cpentry[3],$cpentry[2],"CONCURRENT LOGIN - TERMINATING OLD SESSION");
unset($cpdb[$sid]);
}

To get smaller voucher codes:

Generate new private and public key pair (can be done on any computer.)


openssl genrsa 31 > key.private
openssl rsa -in key.private -pubout -out key.public

Paste key.private and key.public in Services > Captive Portal > Vouchers under Voucher Public Key and Voucher Private Key.

I also changed the Character Set to: “2345678abcdefhjkmnpqrstuvwxyz”

It then generated 7 character voucher codes.

One Response

  1. Oliver Franklin Says:

    Hi Craig,
    Re: reusable vouchers pfsense.

    This didn’t work. Even with reboot.

    Any other suggestions ?

    Cheers,
    Oliver

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.