CityHost.UA
Help and support

How to restrict access to the site for individual IPs?

To configure site access control, go to your control panel: [link to control panel]

Next: [Hosting 2.0 -- Management] :

Go to the [SITES] tab and click on [MANAGEMENT] . Opposite the [ACCESS RESTRICTIONS] item, click the [EDIT] button:


In the following menu, select the desired action from the list[1] and click on the [add IP][2] button:

[Access is allowed to all except] - the rule allow from all, deny from ip_list will work, this means that access to the site will be open from all IP addresses, except those added by you to the list;
[Access is prohibited to all except] - the rule allow from ip_list, deny from all will work, this means that access to the site will be closed for all IP addresses, except those added by you to the list;
[Access denied / allowed for IP] Ч list of all IP addresses for the corresponding rule[1];
Ч when changing a rule from the proposed list, the list of previously added IP addresses is deleted;
Ч if there are no values for the IP address field, the rule will not work;


The next step is to add the desired IP address to the appropriate input field[1] and click the [ADD][2] button:


Ч changes take effect instantly;
Ч a 403 response will be returned for blocked IP addresses;
Ч this type of blocking is implemented at the nginx configuration level, which is a more reliable and faster way of blocking than through .htaccess;