Control Web Panel

Security => CSF Firewall => Topic started by: MMatyas on July 30, 2021, 01:57:44 PM

Title: Limit accessing 2031 control panel port by IP address
Post by: MMatyas on July 30, 2021, 01:57:44 PM
Hi all
I want to disable login screen to control panel except specific IP addresses on my server
Assume my cwp login address is site.com:2031/login/index.php
I want only allowed IP addresses can see this screen
Can I manage this by creating a csf rule granting access for specified IP addresses,
 1.1.1.1 is allowed for 2031 or 2087 port
Title: Re: Limit accessing 2031 control panel port by IP address
Post by: studio4host on July 30, 2021, 04:52:18 PM
simply lock the port and whitelist your IP or enable IP limit in CWP as mentioned on the cwp wiki
Title: Re: Limit accessing 2031 control panel port by IP address
Post by: Painkiller88 on July 30, 2021, 07:20:14 PM
Yes there is an official way to do this.

1. Create the file /usr/local/cwp/.conf/.access_root
2. Enter the IPs you wanna allow, one IP per line.

If you wish to remove an IP just delete the line with this IP or delete the file to allow all IPs again.
Title: Re: Limit accessing 2031 control panel port by IP address
Post by: whitedd on February 12, 2024, 02:58:37 AM
Is it posible to allow IP range?
example: 22.33.0.0/16