What is pfSense?
pfSense is a very powerful, open-source firewall and router software. It is based on FreeBSD and offers more features than most commercial firewall devices. pfSense is especially used in shared hosting infrastructures (example: Shared hosting) and VPS systems. It is also frequently preferred on German location servers like Hetzner.
What is Captive Portal?
Captive Portal is a system that requires users connecting to a network to pass through an authentication page before accessing the internet. It is very commonly used in public places such as hotels, cafes, and schools.
How to Install Captive Portal on pfSense?
1. pfSense Installation
-
Download the pfSense ISO file and burn it to a USB or CD.
-
Boot the server (physical or virtual) with the ISO.
-
Follow the installation steps:
-
Disk partitioning
-
Assigning network interfaces (WAN and LAN)
-
-
After the installation is complete, access the web interface with the IP address.
2. Basic Network Settings
-
Provide internet access for the WAN interface.
-
Define the internal network for the LAN interface.
3. Captive Portal Installation
-
Open the Services > Captive Portal section in the pfSense panel.
-
Create a new Captive Portal zone.
-
Select the network (usually LAN).
-
Select Authentication Method (Local User Manager, Voucher, RADIUS, etc.).
4. Captive Portal Settings
-
Session Timeout: Determine the session duration for users.
-
Idle Timeout: Disconnect the connection if there is no activity for a certain period.
-
Hard Timeout: Automatically log out after a certain period.
-
Portal Page Contents: Customize your login page.
5. User Management
-
Create new users from System > User Manager section.
-
Use this user information when authenticating with Captive Portal.
Captive Portal Example Scenarios
-
Customers connecting to the network from their phones in a cafe and accessing the internet by entering a password from a web-based "Login" page.
-
Students accessing the network only with their school information in a school.
Things to Consider During Installation
-
It is recommended that your server has two network cards (WAN and LAN).
-
Using an SSL certificate for Captive Portal reduces browser warnings.
-
DHCP settings must be configured correctly.
Frequently Asked Questions (FAQ)
Is pfSense free? Yes, pfSense is completely open source and can be used for free.
Does Captive Portal work on mobile devices? Yes, it works seamlessly on both mobile and desktop devices as long as modern browsers support it.
Can I create more than one Captive Portal zone? Yes, you can define multiple Captive Portal zones on pfSense.
On which hardware can pfSense be installed?
-
Physical servers (x86 architecture)
-
Virtual servers such as KVM, VMware, Hyper-V
-
Cloud environments (certain settings may be required)
Conclusion
You can make your network more secure and controlled by using pfSense and Captive Portal. If you are hosting your servers in environments such as Shared hosting, VPS or Hetzner Cloud, professional solutions such as pfSense will further strengthen your infrastructure.