...
- Connect to the master server via SSH
Create the additional configuration file in
/usr/local/svmstack/nginx/conf/services/
directory:Code Block # touch /usr/local/svmstack/nginx/conf/services/blockip.conf
Set up list of allowed/denied IP addresses, here is an example:
Code Block deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/16; allow 2001:0db8::/32; deny all;
Check for more information on Nginx documentation portal
(Optional) In case of the WHMCS module or otherwise accessing SolusVM graphs via API /graphs directory should be excluded from IP restriction. Open the file `/usr/local/svmstack/nginx/conf/services/custom/legacy-master-after-php-location-443.conf` and add the following:
Code Block location /graphs{ allow all; }
Restart the service to apply the changes:
Code Block # systemctl restart svmstack-nginx.service
OR
Code Block # /etc/init.d/svmstack-nginx restart
...