Unifi Remote User VPN setup and firewall rules
Table of Contents
Introduction
This tutorial will guide you through the process of setting up a remote user VPN in the Unifi Network Controller version 7.0.23, along with configuring firewall rules to restrict VPN users from accessing certain networks. This setup is essential for maintaining network security while allowing remote access.
Step 1: Create the Remote User VPN
-
Access Unifi Network Controller:
- Log in to your Unifi Network Controller.
-
Navigate to Settings:
- Click on "Settings" in the sidebar.
-
Select VPN:
- Go to the "VPN" section.
-
Add a New VPN:
- Click on "Create New VPN".
- Fill in the required fields:
- Name: Give your VPN a recognizable name.
- Type: Choose "Remote User VPN".
- IP Range: Define the IP range for the VPN users (e.g., 192.168.10.0/24).
-
Authentication:
- Set up user authentication:
- Choose between username/password or certificate-based authentication.
- If using username/password, ensure to create user accounts for each VPN user.
- Set up user authentication:
-
Save Changes:
- Click "Save" to apply the VPN settings.
Step 2: Configure VPN on iPhone
-
Install OpenVPN App:
- Download and install the OpenVPN app from the App Store.
-
Import VPN Configuration:
- Obtain the VPN configuration file from your Unifi settings.
- Open the OpenVPN app and import the configuration file.
-
Connect to VPN:
- After importing, tap on the VPN profile and connect using the username and password you set up earlier.
Step 3: Set Up VPN Firewall Rules
-
Go to Firewall Settings:
- In the Unifi Network Controller, navigate to "Settings" and then "Firewall & Traffic".
-
Create a New Firewall Rule:
- Click on "Create New Rule".
- Set the rule to block traffic from the VPN user network to the desired internal networks.
-
Configure Rule Settings:
- Action: Select "Drop" to block the traffic.
- Source: Set this to the VPN IP range (e.g., 192.168.10.0/24).
- Destination: Specify the networks or devices you want to restrict access to.
-
Save the Firewall Rule:
- Click "Save" to implement the firewall rule.
Conclusion
You have successfully set up a remote user VPN and configured firewall rules to control access to your network. This setup enhances your network security while providing the flexibility of remote access. Next steps could include testing the VPN connection and ensuring that the firewall rules are effectively blocking access as intended. For further customization, consider exploring additional Unifi features or consulting the Unifi documentation for advanced configurations.