Email capture when you use captive portal



  • Hello,

    I'm new to the forums, so I hope I'm posting in the right spot. I'm fairly new to pfsense as well.

    I am building a captive portal for pfsense (with the FreeRadius Pkg) that will ask a person for their name and email in order to proceed to the internet. I have the basic layout of the page built, but I'm having issues getting the "I Agree" button to do two events one after the other.

    The first event would be the Name and Email requirement, which will not let them proceed unless the information is filled in. The second event, would be proceeding to the internet.

    I've tried to find a way to easily have the page communicate with the FreeRadius and export that .txt file but nothing seems to be working with that either.

    Any ideas would be appreciated.
    Thank you for your time.

    Here is the basic layout of my page in HTML:

    <form id="Form1" type="text" action="post" method="get">

    |

    |
    |

    First and Last Name:

    Email Address:

    |
    |

    Terms of Use

    By agreeing to the Terms of Use, you are agreeing:

    • To allow us to use your email for promotional and interactive purposes.

    • That you are responsible for what you do while connected to our service.

    • You understand that this is a public wifi and there are possible confidential and security risks.

    |
    |

    |

    </form>


  • LAYER 8 Netgate

    The easiest thing is probably using a pre-auth URL that collects the information you want and bounces back with an affirmative response.

    Else you need to modify the captive portal functions that deal with those fields and add an email address there, find a way to store it, etc.

    The latter incurs technical debt in merging your changes at every upgrade.



  • Look in forum for pfsense+cp+freeradius some guy has built exactly what you are looking for

    https://forum.pfsense.org/index.php?topic=108493.0


Log in to reply