Nextcloud version (eg, 18.0.2): 18.0.7
Operating system and version (eg, Ubuntu 20.04): nextcloudpi
Apache or nginx version (eg, Apache 2.4.25): need to check
PHP version (eg, 7.1): 7.3.14
The issue you are facing:
Form time to time, the website is unavailable from wifi connection. If I try to access huberconsulting.ddns.net form my laptop, it will show up a message saying “site could not be reached - response took to long” [ERR_CONNECTION_TIMED_OUT] and some DNS statement. But this seems to be something with my router, since the website is available, if I try to connect from my phone by using 4G.
It wasn’t working with my old router. Now I changed the router to a FritzBox 7590 but it still is not working. I assume it is something with DNS resolution.
I use no-ip as a DNS partner, but since the website is there via 4G it rather is something with my local network.
Is this the first time you’ve seen this error? (Y/N):
Most likely you try to access Nextcloud from your LAN using your external DNS name. This usually couldn’t work, because your FB is used as a simple local DNS and DNS forwarder to the internet. Due to the fact that the DNS name is a non-local one, your request is sent to the internet, resolved to your external ip address which is unreachable from your LAN because it points to the external ip of your router. A remapping to a local ip address is not possible.
Afaik, it won’t be possible to solved this problem by installing a local DNS server to remap the ip address, because this only works with 2nd-level domains. But it might be possible to add a static entry to your local hosts file on each client.
thanks for your quick reply. I am aware about this situation and I solved it for DNS resolution if I am at home. It works fine from home. But let me maybe explain the setup a little more in detail. Maybe I was not clear enough.
I have the Raspi located at home with the nextcloupi installed on it and running. FB (6590) has a static IPv4 which is linked to a domain via No-IP DNS resolution. If I access at home the domain, it works since I have corrected the hosts/rebind in the FB. Also via IP it works - of course - at home.
If I am in the office of my wife - same city but other location and separate internet access with FB 7590 and connected via wifi - the cloud works most of the time, but from time to time it does not and the browser is showing the message as mentioned before (“site could not be reached - response took to long” [ERR_CONNECTION_TIMED_OUT]). But if I - almost at the same time - use my mobile browser (Safari) and 4G connection, it shows me the webpage and I can easily access it.
So my assumption is, that it has something to do with the local network and the FB in my wifes office.
Yes, that sound reasonable. Afaik, FB 6590 is a cable router which might not be reachable from the internet by default because DSL light is very often be used. But if you say you’ve assigned a static IPv4 address you worked around that trap already. What about IPv6, could this cause problems if you haven’t opened an inbound port to reach your server?
IPv6 was actually still disabled at my FB 6590, since I did not activate it when I received this new one. I have now and the nextcloudpi has also portforwarding for its IPv6 address activated . Will monitor it and let you know.
Unfortunately this seemed not to be the root cause of the issue. Today I have the same trouble again, accessing the domain from outside home (aka office of my wife).
What I realized in the meantime:
a) I can ping the site (huberconsulting.ddns.net) via CMD
b) I can SSH into the server via the domain name from outside home
c) If i try Internet Explorer (not Edge or Chrome) it says something about “not safe to connect” and something around outdated TLS
Does that help?
I restarted Apache via SSH and then it worked again. Seems pretty strange. Any ideas?
Thanks for the feedback. Actually the security thing is why I am on here. A security consultant won’t work, as I am the administrator and we have no money in this new business to spent it for a consultant.
However, I assume the browser is not the issue. I get several messages in the different browsers, but all cannot access the page from time to time. See pictures below. But via SSH and ping command it still works.
Please check if you have new IP address frequently, in Fritzbox you can see it.
It could be that IP was changed, but DNS cache still pointing to the old one and this cause an error.
Check if nslookup under windows pointing to the correct IP when you have an error.
Option 2 could be that Your address is blocked by your corporate policy, but if you use HPKP or/and HSTS then browser will not be able to show you any warning Landing Page.
thanks for the remarks. I have a static IPv4 address at the location where the nextcloud is located. So this does not change. And the strange thing, as said, is, that I can at the same time (e.g. via screen share) access the website from my laptop (location somewhere else) but from within the office, laptops are not able to connect.
I have now also used nslookup and ping commands. The laptop in my wifes office, who cannot access the domain still gets positive results for nslookup and ping. So the page itself is there but safari, chrome or whatever doe not show them.
No, if a laptop is in this network, it has the same problem. Also mine, which works at home or at another location, does not work if I am at her office.
No, it is the same situation with different browsers (chrome, IE, firefox etc.)
And also the same on my laptop or another employees laptop with various browsers.
Seems all nice. But i think i would deactivate IPv6 on the fritz.box (see at the beginning of the screenhost). Perhaps only with IPv4 (if you do not need IPv6) you can solve your problem. Edit your configuration on your Fritzbox.