DNS issue / ERPNext issue?

I am facing a problem which might not be the right issue to post here but I can’t deny the possibility. Hence posting here anyway with a hope of getting the right insight.

I have a self hosted ERPNext instance accessible at erp.example.com.

Sometimes, I can’t access the application at all, not on computer, not on mobile device. The browser gives connection timed out error.

Strange thing is that I can access the website if I immediately switch to mobile data while the office wifi just can’t load the website (I have confirmed it is not internet connection issue/other sites are running good). The site is accessible at another location.

Sometimes, one location gets blocked while sometimes another location gets blocked. It lasts for a few minutes and then the website works fine in a while.

I am guessing this is a DNS resolving issue.
Or could it be that the server is rejecting connection from some IP ?

Did you have anything setup like fail2ban or crowdsec?

I once made the mistake that I wanted to secure the server with Crowdsec, didn’t set it up properly and effectively shut-out my users. It had a similar feel to it, as to sometimes it would work, but then not for some times. Until I figured it out and turned Crowdsec off.

I don’t quite know. I followed installation steps shared in this forum.

I have heard of fail2ban.

How can I check if anything such is installed?

You can try sudo systemctl status fail2ban.service and see if there’s something coming back. But I doubt that you have it if you’re not aware to have installed it.

Surprisingly, fail2ban is installed. How can I solve the issue I mentioned ?

What causes fail2ban to trigger and disallow connection ?

I’m pretty sure you might find more information here: GitHub - fail2ban/fail2ban: Daemon to ban hosts that cause multiple authentication errors