Can't access my NextCloud from my local Wi-Fi on mobile devices, even though I can access it from my cellular network on mobile and from WiFi on my laptop

Server: [Looks like a local IP address]
Address: [Looks like a local IP address]

This means your Linux desktop is resolving against a local DNS server somehow (that “looks like a local IP address” is your local DNS server or some other mechanism that responds to the DNS queries. DDNS client? Your router? How is it possible you have a local DNS server and not know about this?

It’s puzzling. Like I said earlier: some bits of information about your setup are missing from this discussion.

What is even more puzzling is that 8.8.8.8 can’t resolve your domain on the public side. If that domain is registered with a public DDNS service then 8.8.8.8 should be able to resolve it.

This is looking more than a typical “split DNS” thing, but some sort of misconfiguration.

Your local nslookup request should use your ISPs DNS or some other public DNS, why is it using a local IP for DNS resolution?

So, check the IP settings on your Linux box, something like ip -c a to see what DNS server it’s using.

Consider using a real DDNS service such as No-IP or DynDNS instead of TPLink’s possibly half-baked solution.

Install a local DNS server, like Pi-Hole or AdGuard. AdGuard is easier and since you’re tinkering with Linux you should find it trivial to install. It’s just a standalone executable you run from /opt and a single config file, easiest thing under the sun.

Then do two things:

  1. Set your DNS on your Linux PC to 1.1.1.1 (Cloudflare as 8.8.8.8 is Google’s and it can be a mixed bag) and see if then nslookup resolves your server domain properly. Then try connecting to your Nextcloud server from the PC. If your domain IS resolved properly to your public IP AND you CAN connect to your Nextcloud then the problem is not “split DNS” and, if it works now, this is it, you’re done, problem solved. However, if the domain IS resolved properly BUT you CAN’T connect to your Nextcloud then the problem is indeed “split DNS” and then go to #2.

  2. Set the DNS on your Linux PC to your local DNS, you’ve just set up, or, alternatively (if you don’t want to mess with a local DNS), add the server’s IP and domain to your hosts file. Now run nslookup - it should resolve your domain name to the actual, local IP of your server - now try to connect to your Nextcloud, it should work fine now, as it will connect directly to the local IP bypassing your public IP/name altogether.

Congratulations on your new baby :smiling_face_with_three_hearts:

Lots of routers are also able to work as a local DNS-Server. The point is just that some folks are not aware aboiut this.

So i do not find it puzzling @hap’s Router offers that.

Here is an example what @hap most likely have done:

This isn’t an example from @hap’s router but from IPFire; however, many routers do offer similar options.

And if @hap has used a similar option, then he’s done everything correctly on his LAN. The only thing left to check is why

  • 8.8.8.8 cannot resolve the domain name and

  • why the smartphone, whilst on the LAN, isn’t using the router’s DNS server and isn’t getting the same response as the Linux desktop

But since @hap now first time mentioned he is using a Linux desktop. there is of cause another option. this is

  • his Linux desktop is not at all using any DNS-Server to resolve the IP of the Nextcloud-Server, because @hap was edditing the /etc/hosts of his Linux desktop. As soon as there is an entry for an FQDN in the /etc/hosts file, this is used and the DNS server is no longer queried, as entries in the /etc/hosts file always take precedence.

Yeah, I forgot that, I always used some public DNS and just forget that most people don’t do that.

Right, that’s the most logical explanation but I missed, did @hap say they edited the hosts file? Anyway, I said all I could think off, hopefully @hap will get some ideas out of that. Thanks!

Hi everyone,

Thank you again for your detailed help and support! For some reason unbeknownst to me, I am now once again able to access my NextCloud on my cell phone using our local Wi-Fi. Maybe a power outage reset the router; maybe an overnight update resolved some incorrect setting. But at least for now, all is well :slight_smile:

I do really appreciate all of your input, though! Hopefully this thread will be a useful resource for anyone else who encounters the same issue.

I don’t really believe in Jesus-style miracle cures, but if that’s all right with you…

I wanted to chime in as I am experiencing what looks like a similar issue.

I have a few nextcloud servers running on my local network and I handle connection with haproxy. I am currently on pfsense and have been trying to migrate to OPNsense.

Long story short, when connecting to my nextcloud accounts using Firefox, often, not all the time, I do either get something like “Server not found…” or Firefox freezes for a moment (like 10-20 seconds) before the content of the page finaly display properly.

Accessing the different menues inside nextclouod may also encounter this delay.

I spent most of my troubleshooting on the OPNsense and haproxy setup using curl, traceroute, nslookup… but didn’t spot any irregularities.

I found that if I use Firefox over VPN, the delay doesn’t seem to show up.

I always connect using my nextcloud domain name. At some point, I tried connecting using my server local IP address , and the freeze or delays seems to no longer occure.

I also found running Firefox to access my various account, I recently experimenting with Chrome as my last resort and found that Chrome doesn’t experience this issue.

While Firefox is hanging, I can access the same account with Chrome as if nothing out of the ordinary happened.

With pfsense, I have the same delays with firefox but the Windows Desktop application doesn’t have any connection issues.

With OPNsense, Windows Desktop application has connection issues which indicate I may have other improperly configured firewall.

When using Firefox with F12 key pressed and looking at the Network field, the freeze occur with the first GET…

GET mydomain.com/apps/files/ with initiator: Documents

If I stop connecting via VPN, Firefox seems to be working file for a while.

I am curious if the OP is able to confirm if his issue is the same, otherwise, what step should I take to debug what appears to be a Firefox specific issue

Hi @ApolloS1, it’s possible that this was a Firefox-related issue for me as well, since that was my main mobile browser. I should definitely have tested the issue out on other browsers as well. If it happens to reoccur, I’ll see whether similar behavior occurs on Chrome and Brave.