How to IP-limit admin-area access

You can set IP addresses allowed to Login to your admin portal in Settings → Security Settings → Admin Area Allowed IPs.

If you'd like to go further, and block unwanted IP addresses on web-server level, you can do so by updating nginx config files.


How to IP-limit admin-area access on nginx


1. SSH to your HostBill Enterprise server as root:

2. Create file  /etc/nginx/hostbill_phpfpm, add the following content to it:

3. Edit file:

  • Replace its contents with following:

  • Make sure to change /admin to other folder name, if you have changed your admin folder 
  • Add each allowed IP / CIDR subnet in new "allow X.X.X.X" block
  • Save changes

3. Reload webserver's config