Local server can't be seen on Android or iOS, but can on any Linux device
192.168.x.x:1500
So I have a small local server running a website. It's not public facing at all, has a static IP address on my WiFi LAN and can be accessed by any Linux machine. I can't see it on any iPhone or Android device though
I've looked up tutorials on line, ensured my firewalls allow local sharing on the WiFi, double checked I can even ping the server successfully with nmap on Android
Any tips?
::edit:: typo in post, not when searching for IP on LAN
I’d curl from a machine on the same WiFi network as the phones just to confirm that HTTP is working. That way you’re not dependent on browsers that can be more finicky for debugging.
I had some similar symptoms on a Fritzbox router, because by default the devices connected over wifi were unable to communicate with those connected by cable. Some routers also had this setting for the different wifi bands, 2.4G & 5G.
But I don't think you'd be able to ping it if this were the case.
Your network is probably configured with inconsistent subnets / netmasks. iOS / Android are on WiFi and getting a different subnet/netmask than your severs.
Edit:
What does pinging the server with nmap mean? Are you checking open ports or pinging the server? That doesn’t make sense or at least leaves us with more questions with the way you worded that. Although the nmap utility can provide both of those answers, I’m not sure that’s what you meant. Technically nmap and ping are two different tools.
Disable your mobile network and try again. I had the very similar issue where it would always fallback to the mobile network for local IPs although WiFi was connected and in the same subnet
My guess is that you are making a typo. Like others have said 192.162.x.x is a public IP. You probably want something like 192.168.x.x which probably is more like 192.168.1.1/24 with the last 1 being its own number
There are two causes here. Either server fucks it self over or the client fucks itself over. For server check logs, for client: check spelling, specify full protocol and try different browser to pinpoint the problem.
It would be great to see the full ip address output from 'ip -c a' on both client and server.
On your router, are there any settings specific to any host (other than the server maybe)? For example, a static IP or a port forwarded rule.
Do you have a VPN on the phones? Can you traceroute from your phone to the server and post that? (I like PingTools for Android.) You should have 1 hop (you -> server, nothing in between).
Can you verify that you are on the same wifi including same wifi channel? Phone on 5GHz but Linux box on 2.4GHz, for example.
I have a very similar issue.
Seems like Android will bypass your DNS resolver and thus cannot resolve your local names.
I have my home services on "home.mydomain.com" accessible from outside and re-mapped to "192.168.0.1" (my internal server IP) at home, and all PCs can access it while all android phones can only resolve to the public IP.
I feel it's something related to DoT or similar but haven't yet dig in that.
might be your smartphone browser/system is using some kind of proxy. this could explain that you are able to ping, but the browser shows access denied. if no log entries are generated on the server when trying to access it via browser, it has to be something on client side or inbetween. on grapheneOS check: Settings - Network and Internet - Internet - Wifi-Settings - choose edit at top right - then advanced. If proxy is not set to none, change it and test again.
If this still doesn't help, my last bet is some kind of duplicate IP