IPv6 Firewall Rule: Allowing Public Access to Two Different Web Servers (Ports 80 & 443) Using Unifi Security Gateway
In this article, we will discuss how to create a firewall rule in Unifi Security Gateway (USG) to allow public access to two different web servers running on two separate computers via IPv6 protocol using ports 80 and 443. This setup is useful for hosting multiple websites on different servers, accessible from the internet.
Prerequisites
- Two web servers running on two separate computers
- Unifi Security Gateway (USG) with internet access
- Static IPv6 addresses assigned to the web servers
Network Configuration
Before creating the firewall rule, it is essential to configure the network settings correctly. Assign static IPv6 addresses to both web servers, and ensure that the USG is also configured with a static IPv6 address.
Creating the Firewall Rule
To create the firewall rule, follow these steps:
- Log in to the Unifi Controller.
- Navigate to the "Settings" tab and click on "Networks."
- Select the network where the web servers are connected.
- Click on the "Firewall" tab and then click "Add Firewall Rule."
- Configure the firewall rule as follows:
- Name: Allow Public Access to Web Servers
- Action: Accept
- Protocol: TCP
- Destination Ports: 80, 443
- Source Addresses:
::/0 - Destination Addresses:
[Web Server 1 IPv6 Address], [Web Server 2 IPv6 Address]
This firewall rule will allow incoming traffic to ports 80 and 443 from any source address to the two web servers' IPv6 addresses.
Verifying the Firewall Rule
To verify that the firewall rule is working correctly, you can use a tool like You Get Signal to check if the ports are open. Enter the public IPv6 address of the USG and the destination ports (80 and 443) to test the connectivity.
- Configure the network settings with static IPv6 addresses for the web servers and the USG.
- Create a firewall rule in USG to allow incoming traffic to ports 80 and 443 from any source address to the two web servers' IPv6 addresses.
- Verify the firewall rule using a tool like You Get Signal.
References
--endarticle--