this post was submitted on 20 Aug 2024
44 points (94.0% liked)

Selfhosted

39167 readers
377 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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

top 43 comments
sorted by: hot top controversial new old
[–] hungover_pilot@lemmy.world 22 points 3 weeks ago

Are you sure you are typing the address in correctly on android/ios? 198.162.x.x isnt part of private IP space.

[–] bjoern_tantau@swg-empire.de 17 points 3 weeks ago

Have you tried different browsers? You should also enter the full URL sometimes they're a bit stupid nowadays. So http://192.168.x.x:1500/

Maybe the browsers bring their own VPN. Some process all traffic to make it more "mobile friendly". Or they have some other kind of proxy.

[–] Finadil@lemmy.world 14 points 3 weeks ago (1 children)

Also check to make sure the mobile browsers aren't set to HTTPS only, or at least have an exception for that ip. I've seen that before several times.

[–] undefined@links.hackliberty.org 5 points 3 weeks ago

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.

[–] SergeantSushi@lemmy.world 12 points 3 weeks ago (1 children)

Some possibilities:

  1. WiFi has host isolation is enabled
  2. The network you're connecting from is a guest wifi network
  3. You configured a firewall rule to isolate WiFi from LAN
  4. VLAN is enabled
[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago (1 children)

But if I can see the server on the same WiFi network from any Linux machine wouldn't that ensure all those steps are OK?

[–] SergeantSushi@lemmy.world 1 points 3 weeks ago

I was assuming your server and Linux device were plugged in via Ethernet and your mobile devices were using WiFi. Now it sounds like your Linux system may be using the same access point.

It could be something as simple as your browser trying to send the address to a search engine instead of directly looking for the site.

When you're trying to access it on mobile do you manually enter "http://" or "https://"? Those default to ports 80 and 443 respectively.

If you're using nonstandard ports you may need something like "http://192.168.1.42:8080" to use http on port 8080 or any other nonstandard port.

Even if you are 100% sure your server is http or https try the other one to see if your error changes.

[–] jet@hackertalks.com 9 points 3 weeks ago (3 children)

Are your phones on the same network? Same vlan? Firewall rules? VPN?

Does tcpdump on the server see the request?

[–] jet@hackertalks.com 8 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I get a lot of downvotes. I realize I say things that can be divisive. Why are people downvoting debugging steps? What's divisive about that....

[–] catloaf@lemm.ee 11 points 3 weeks ago (1 children)

Don't worry about downvotes.

[–] jet@hackertalks.com 4 points 3 weeks ago (4 children)

I'm just trying to understand the rational. To me I downvote when the comment is against the community, or unproductive.

If I'm being a net negative I should know why! Usually I have a guess as to why, but when I don't, I reach out so I can understand better. I do want lemmy to be a better place, so feedback is useful.

[–] catloaf@lemm.ee 10 points 3 weeks ago

When there's only a few, it's basically just statistical noise. Some people downvote anything. Some people just have fat fingers and missed the upvote button.

[–] qjkxbmwvz@startrek.website 2 points 3 weeks ago

Some mobile clients make it easy to accidentally downvote. I sometimes see that I accidentally downvoted a comment from time to time.

[–] shamrockpreacher5@reddthat.com 2 points 3 weeks ago

Your comments were good and kind. Debugging even obvious things is good since computer science is literal magic electrified rocks and keeping every step in our heads is impossible

Yeah don't worry about the downvotes

[–] sunzu2@thebrainbin.org -3 points 3 weeks ago

If you say controversial shit outside of tech, mentally I'll will follow you around downvoting.

So you will see all of your post have a few downvotes.

If it is just this one time, it is likely an anaomaly.

Edit: BTW tcp dump is a nice trick, so you deff added to the discourse here IMHO

Many people learn Linux and networking from these threads where idea are flying around. So deff don't stop lol

[–] RootBeerGuy@discuss.tchncs.de 3 points 3 weeks ago (1 children)

Yeah, if phones go via WiFi and the computer is on a cable the IP ranges may differ and that would explain you can access only via one of the two.

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago

Yeah everything (server, Linux clients, Android clients, other clients) is on the same WiFi network which is why this is extra frustrating since Linux just works like usual

[–] shamrockpreacher5@reddthat.com 2 points 3 weeks ago

No tcpdump isn't seeing the request... Thanks for the suggestion

[–] Deckweiss@lemmy.world 7 points 3 weeks ago

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.

Check yoyr router settings anyway, maybe you'll find something there.

[–] zelifcam@lemmy.world 6 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

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.

[–] shamrockpreacher5@reddthat.com 0 points 3 weeks ago (1 children)

nmap -Pn 192.168.1.2

At least it shows the server is up from the client's perspective (other clients can actively see the same IP and server on port)

Same WiFi subnet

[–] zelifcam@lemmy.world 2 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Same netmask?

When asking for network troubleshooting assistance, super useful to provide ANY kind of network info. So far we have WiFi and same subnet. Yet absolutely no details which are necessary to help form questions or provide answer.

Can you post the IP Netmask and Gateway of your Linux server and one of your mobile devices that can’t view the server?

Can you ssh into the Linux server from your mobile device?

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago (1 children)

Yeah same netmask of 255.255.255.0

[–] zelifcam@lemmy.world 0 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Then there has to be a firewall, web server whitelist or some kind of configuration issue with the service being hosted. Because according to all your responses they are on the same WiFi with the same subnet/gateway/netmask.

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago

That makes sense, I'll have to check the path. Thanks for lending your thoughts on this

[–] bizdelnick@lemmy.ml 6 points 3 weeks ago (1 children)

What error you get exactly?

[–] shamrockpreacher5@reddthat.com 2 points 3 weeks ago (1 children)
[–] Shimitar@feddit.it 1 points 3 weeks ago

Install some DNS test app for Android and check that it does get resolved.

My will resolve the home server address to 0.0.0.0, and I get the same network error.

[–] manuel2258@lemy.lol 6 points 3 weeks ago (1 children)

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

[–] shamrockpreacher5@reddthat.com 3 points 3 weeks ago

No mobile network

[–] Agility0971@lemmy.world 5 points 3 weeks ago* (last edited 3 weeks ago) (1 children)
  1. network interface - check
  2. dns - not applicable
  3. firewall - check
  4. ping - check
  5. navigating to the web site - fail

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.

[–] shamrockpreacher5@reddthat.com 3 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Thank you

Any good debugging tools for android here or should I just rely on Linux networking tools through installed shells? Is there an industry standard for Android as a client?

[–] qjkxbmwvz@startrek.website 2 points 3 weeks ago

PingTools has been useful for me (though I mostly just use it for iperf).

[–] possiblylinux127@lemmy.zip 5 points 3 weeks ago

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

[–] qjkxbmwvz@startrek.website 3 points 3 weeks ago

Any chance you have a DMZ set up on your router?

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.

[–] atzanteol@sh.itjust.works 3 points 3 weeks ago (1 children)

Dunnon about iOS but some Android phones have a "network protection" config which uses a Google VPN, so it tends to block viewing the local network.

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago (1 children)

Is there a setting for this? Yeah, I assume it's some default setting I missed

(I'm seeing this issue on any Android distro, I've tried a few)

[–] atzanteol@sh.itjust.works 1 points 3 weeks ago (1 children)

It's listed as a privacy option on my pixel. It may be different for others but you could try searching the settings for "vpn" or "privacy."

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago

Hmm not seeing it on GrapheneOS

[–] Decronym@lemmy.decronym.xyz 1 points 3 weeks ago* (last edited 3 weeks ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
HTTPS HTTP over SSL
IP Internet Protocol
SSL Secure Sockets Layer, for transparent encryption
VPN Virtual Private Network

5 acronyms in this thread; the most compressed thread commented on today has 13 acronyms.

[Thread #928 for this sub, first seen 20th Aug 2024, 15:45] [FAQ] [Full list] [Contact] [Source code]

[–] Shimitar@feddit.it 1 points 3 weeks ago (1 children)

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.my domain.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.

[–] shamrockpreacher5@reddthat.com 1 points 3 weeks ago

Interesting, thanks for the info

[–] shrugs@lemmy.world 1 points 3 weeks ago

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