Can pfSense do this? System that users use to gain acsess to the internet

  • Hi, I am wanting to create a system for a local network where the user has to be logged into a system to have access to the internet. I know this is possible, but I am unsure on how to go about creating it.

    What I want is, when someone connects to the network (via Ethernet) what ever website they try to go to will redirect them to my php site, where they will have to register and stay logged into in order to have access to the internet. So they will be forced to have a tab of my system open at all times.

    I think the best way in which to do this would be for the php site to refresh every 5 minutes. Then when the server picks up the page request and if the user is a member, then the MAC address from the ip address is found and that MAC address is added to the allow list with a 10 minute timeout. Otherwise the user is redirected to the system's page.

    But can this be done with pfSense, and if so how do I go about creating a list of allowed users, redirecting unallowed users and adding to the MAC list from php?

    Thanks in advance.

  • You should have a look on "Captive Portal" on pfsense. When a user connects to the ethernet and wants to open a webpage like google he will be redirected to the CaptivePortal page. You can designe this page as you like.

    User can login with username/password oder with a voucher or you do something with freeradius (additional pfsense package) + mysql with a self registration page.

    Perhaps have a look at this documentation:

Log in to reply