Blocks IPs using Nginx Proxy Manager

Tiempo de lectura: 2 minutos

Hello, today we are going to learn how to block IPs, for example, Bots on the internet using Nginx Proxy Manager.

Nginx Proxy Manager is a graphical interface that simplifies the management of proxy servers and the configuration of Nginx. Through this interface, you can set up blocking rules for specific IP addresses.

To configure it, follow these steps:

  • Access Nginx Proxy Manager: Enter the Nginx Proxy Manager interface using your web browser and the URL and port it is configured on.
  • Configure the Blocking Rule:
    • Go to the “Access Lists” tab or a similar tab in the Nginx Proxy Manager interface.
    • Here, you should be able to configure an access list that blocks specific IP addresses. Access lists can often be configured both to allow and block IP addresses.
  • To do this, click on Add Access List
  • First, give a name to the rule you have created and check Satisfy Any

Now go to Access, the Authorization section will not be needed in this example.

    • Add a first rule of type allow with value all to allow browsing for all other IPs.
    • Add the IP Addresses to Block: Add the IP addresses you want to block in the blocklist. You can enter individual IP addresses or IP ranges in the appropriate format.
    • To add more, click on add. *In my version of NPM, there is a bug that causes the previous IPs we added to be deleted without clicking Save first. To avoid this, try to add all the rows you need by clicking Add or click Save after adding them.
    • Save the Configuration: Once you have added the IP addresses you want to block, make sure to save the configuration in Nginx Proxy Manager.
    • Apply the Configuration: In some cases, you may need to restart

Leave a Comment