Android devices cannot reach server via Local IP

Hi there.

I can access NextCloud in my home LAN on browser via local IP address (I have setup trusted domain). However, when I tried to login to the Android app via the local IP address, I get Could not find host error.

I have no problem logging into the app via DDNS address that I have setup by following the instructions from NextCloud Snap wiki.

Any ideas for further troubleshooting is welcomed. Thank you.

Please tell us which Software versions you are using, how your network environment is looking like, from which devices you run your tests and how your Android device is connected to your server, over the internet, over a wifi access point. Please be as precise as possible to be able to understand your problem.

Hi there.
OS: Ubuntu 18.04 LTS
NextCloud Snap Version: 18.0.6

My home network: All devices under the same subnet, including the server

Device, Connection, Method, Interface -> Test Result

  1. Laptop, WiFi, Local IP, Browser -> Success
  2. Laptop, WiFi, DDNS address, Browser -> Success
  3. Android phone, WiFi, DDNS address, NextCloud App->Success
  4. Android phone, WiFi, Local IP, NextCloud App -> Could not find host

I think this is all for the information you requested. Please do let me know if you need more information.

Thank you.

  • Which OS are you using on your laptop?
  • Are you running your own DNS server on your LAN or are you using the DNS forwarder on your router?

Which OS are you using on your laptop?

Windows 10

Are you running your own DNS server on your LAN or are you using the DNS forwarder on your router?

I’m using DNS forwarder I assume. I followed the instructions from NextCloud Snap’s Wiki and used Let’s Encrypt with no-IP

I know that Windows uses a local DNS cache function which might be the reason why it resolves the ip address correctly but this doesn’t explain why the Android device has problems to resolv the address.

  • Are you using any kind of tunnel or filter software on your Android phone, like Blokada, which redirects all traffic directly to the internet?
  • Are you able to reach any other device on your LAN from your mobile phone?

Are you using any kind of tunnel or filter software on your Android phone, like Blokada, which redirects all traffic directly to the internet?

No, I’m not using any kind of tunnel or filter software.

I do use private DNS (1.1.1.1) on my phone. I tried logging in into NextCloud on my Android tablet which doesn’t use private DNS and it has the same error of could not find host.

Are you able to reach any other device on your LAN from your mobile phone?

Yes, I do. I use KDEConnect to transfer files via LAN between my devices every day. Since KDEConnect relies on LAN to work, I think it is a good indication that I can reach other devices in the same LAN.

I also tested it by manually going to the local IP of the server by using browser on my Android phone (Firefox) as well as Android tablet (Samsung Internet). Both of the browsers cannot reach the local IP address as well.

Please check if you’ve enabled ip isolation on your wifi router. This could also block traffic, although it doesn’t explain why you can reach other devices?!

No, I did not. It is not a feature found in my WiFi router.

Maybe I need to update the tags by changing it to support I guess? Since at this point it doesn’t look like the problem is with the app :sweat_smile:

So I have tried to run tracert on Windows laptop, Android phone, and Android tablet. The results are quite weird.


192.168.0.146 is my phone’s IP, 155 is the server’s IP. It seems that somehow the request is not sent out of the phone. On my Android tablet it is the same as well, stuck in its own IP.

image
This is the results of tracert from my laptop. As we can see here it connected to the server without much delay.

Any ideas will be extremely helpful. Thank you.

I think this is a little bit out of scope of the Nextcloud forum and seems to be an Android related problem onyour phone. Check the ip settings on your mobile phone, which ip, dns and default router has been assigned and search the internet for any related problem to your phone manufacturer and OS version.