Access Denied: 'Access not allowed from this IP Address' Error in ERPNext - Unable to Login

I’m currently facing an issue where I cannot access my ERPNext instance due to the error message “Access not allowed from this IP Address.” I have verified that I am using the default configuration for my Nginx server and ERPNext setup, but the issue persists. This problem prevents me from logging into the ERPNext interface, and I have to rely on the console for any operations.

I would appreciate any insights or solutions to resolve this problem.

Hi,

It may help to describe the hosting and network environment, and if access was possible at one time or this is the first time a connection has been tried.

this is the first time my network has tired and I am getting no way to solve it.

If you have any steps that will help me in solving the issue, please respond.

Is ERPNext in a virtual machine or Docker on a host on the network?

Has a firewall been configured to allow the port for ERPNext to be accessed?

If we may have a description of the environment.

Execute the following commands at your server’s terminal and check whether your IP is banned through fail2ban jail configuration or not?

sudo fail2ban-client status

sudo fail2ban-client status nginx-proxy

sudo fail2ban-client set nginx-proxy unbanip <IP to unban>

I have applied the solution you mentioned but problem still persists.

/bench/frappe-bench$ sudo systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-08-28 10:29:26 IST; 4s ago
Docs: man:fail2ban(1)
Process: 196525 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
Main PID: 196526 (f2b/server)
Tasks: 3 (limit: 18767)
Memory: 15.4M
CGroup: /system.slice/fail2ban.service
└─196526 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

Starting Fail2Ban Service…
Started Fail2Ban Service.
~/bench/frappe-bench$ sudo fail2ban-client status nginx-proxy
2024-08-28 10:29:55,608 fail2ban [196817]: ERROR NOK: (‘nginx-proxy’,)
Sorry but the jail ‘nginx-proxy’ does not exist
~/bench/frappe-bench$ sudo nano /etc/fail2ban/jail.local
~/bench/frappe-bench$ sudo nano /etc/fail2ban/filter.d/nginx-proxy.conf
~/bench/frappe-bench$ sudo systemctl restart fail2ban
~/bench/frappe-bench$ sudo fail2ban-client status nginx-proxy
Status for the jail: nginx-proxy
|- Filter
| |- Currently failed: 0
| |- Total failed: 0
| - File list: /var/log/nginx/access.log - Actions
|- Currently banned: 0
|- Total banned: 0
`- Banned IP list:

Can you please attach the screenshot of the error “Access not allowed from this IP Address.”?

Hi @sukhman123:

Check User - Settings - Security settings

image

Anything there?

there is no restriction on IP. If there is any other way to solve thing, kindly help.

image

KIndly help me as I am not able to move forward with the thing.

I have 5 apps installed in my site.

erpnext, frappe, and other three are custom sites.