At times users may want to restrict access from external connections to some server resources. This article will show you how to allow access to the FASTPANEL® from you home IP-address only.
How to setup Firewall
FASTPANEL® uses port 8888 by default and you may want to allow access to it for only one IP address and restrict access to any other IP address. Go to "Settings" → "Firewall"
Click "New rule"
In the opened modal window do the following:
- Enter the name of the rule in the "Name" field
- In the "Port" field enter 8888, select "TCP" type as we are blocking TCP connections
- In the "Policy" drop-down menu select "PARTIAL ACCEPT"
- In the additional "IP addres" field appeared to simply click "My IP". The system automatically will detect your IP and paste it in the filed.
Don’t forget to click "Add"
After clicking "Save" the panel will automatically create the following rules on the server:
-A fastpanel_rules -s 126.96.36.199/32 -p tcp -m tcp --dport 8888 -j ACCEPT
-A fastpanel_rules -p tcp -m tcp --dport 8888 -j DROP
The rules above mean that only selected IP address has been granted access to port 8888.