[Solved] Nextcloud server blocked a specific public IP / problem accessing nextcloud

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):

Nextcloud version (eg, 10.0.2):12.0.1 ((My nextcloud instance is running on a VM downloaded from techandme.se ))
Operating system and version (eg, Ubuntu 16.04): Linux nextcloud 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.18 (Ubuntu)
PHP version (eg, 5.6): PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright © 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies
with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright © 1999-2017, by Zend Technologies

Is this the first time you’ve seen this error?: YES

Can you reliably replicate it? (If so, please outline steps): NO

The issue you are facing:
I have a nextcloud server running on a public IP
on the same public IP I have other servers running.

This problem is occurring on one client public IP so far.
Should the client tries to access nextcloud he gets no reply. the browser times out
Should the client tries to access other servers that are running on the same nextcloud public ip all goes well.

nextcloud is running on port xx1
crm is running on port xx2
Odoo is running on port xx3

I tried to reboot nextcloud server. No improvement
I cleared database oc_bruteforce_attempts . no improvements

Same client’s computer , I opened a VPN to another site , nextcloud can be accessed normally.

The output of your Apache/nginx/system log in /var/log/____: apache2 log was cleared then tried to access via client ip
the file stayed 0 bytes.

Nextcloud can be accessed from all other known to me public IPs without any issue.
I suspect that nextcloud did block my client ip address but cannot figure out where to find the solution.

I rule out my firewall , client IP is in whitelist also the same client IP can access all other services.

That makes it look like a network issue. Did you check all your firewalls (client, router, server)? Some providers (free wifis, mobile operators) perhaps block some ips as well.

Cannot be a network issue nor provider
Everyone else can access the nextcloud
same source IP can access other servers on the nextcloud network using different ports.

We are talking about one target public IP with different ports
The source ip can access all ports except that of nextcloud.

The same port of nextcloud can be reached by everyone else.

This is driving me crazy, there must be something on nextcloud that is blocking my source IP in specific.

If you have no idea, I’d use tcpdump to listen directly to network traffic. This way, you can be sure if the request reaches your server.

Except for the bruteforcelogin and perhaps the file access control, I don’t see a way of Nextcloud to prevent access. In both cases, it should be possible to see something on the server logs because Nextcloud can’t change the network settings or firewall rules.

There was a firewall filter problem on client’s side, filter was blocking names not IP addresses and that is why we were able to connect to other names having common IP translation. Funny enough to puzzle me.
Problem solved.

It’s often a bit complicated to figure out what going wrong when dealing with connection issues.

@tflidd that was a hell of an experience.
I was not convinced that the problem could be from the client site, yet for the benefit of the doubt I went that far and demanded to check their firewall. That was a big surprise and a challenge for my bloody experience and reasoning.
I am glad to have solved the problem but corny for the time wasted…