Not an expert but my first thought is check DNS. I would make sure both devices are using the same DNS resolver and are resolving the hostname correctly.
Self Hosted - Self-hosting your services.
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
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- [email protected] is allowed!
- [email protected] is allowed!
- [email protected] is allowed!
- [email protected] is allowed if topic has to do with selfhosting.
- [email protected] is allowed!
If you see a rule-breaker please DM the mods!
This is probably where my lack of knowledge in networking shines through more than ever, but I kinda thought that local IPs would be handled locally and not depend on which DNS servers I use? But I guess that if VPN is active and has not been explicitly told to allow local connections through split tunneling, then it actually do make that request with whatever DNS server I use, which obviously couldn't resolve some random local hostname?
You probably need to set up split tunneling in your VPN app on your phone. Either enable split tunneling for the apps on your phone that you use to connect to your home server or enable split tunneling in the VPN app for the local IP address of your home server so that you can use any apps to connect to your home server while still having the VPN enabled for any other websites you visit in those apps. I know ProtonVPN and Mullvad both automatically have split tunneling set up for local IPs on PC but not for Android, this would explain the differences between your laptop and phone
Ah, that would explain it. I could set up split tunneling on a per app basis only in my current VPN, and not IP, but it works. However, I am in the process of migrating to ProtonVPN now. Here the "per app"-permission also works, and it does have the option to allow certain IPs, but I was not able to get it to work.
It depends on the VPN. Sometimes there's a "block local network access" while connected. It could be a client setting or a server setting. Additionally, VPNs are all about routing. So you could run into a problem if you connect to a VPN where the remote network is the same as the IP address of the server you're trying to connect to.
So if it is that you're having a conflict between the remote and local networks overlapping, you could change the IP addresses on your local network. It's probably a good idea not to use the default subnet that your router gives you (like 10.0.0.0 or 192.168.0.0 or 192.168.1.0).
Just checked this, and "Allows local access" is checked in the VPN application, and "Block all non-VPN traffic" is unchecked in Android settings.
About potentially overlapping IPs: I did check, and they were all different (server, laptop, phone).
Try the VPN IP of your other box instead of the FQDN? I use tailscale+headscale to exit onto my home network from mobile.
I had no idea that two hosts using the same VPN provider would/could be on the same network... I share an account with like 4 other people and we each get one device. Now I have to go look.
Check your wan IP on both your laptop and phone.
I typically use curl https://checkip.amazonaws.com
Tip: curl ifconfig.me
It's shorter, gives additional info when accessed with a browser, and I don't trust Jeff Bezos.
Alternatives:
ipconfig.io
ifconfig.io
ipinfo.io
< this also gives info about the IP and you can use it to do ip lookups with ipinfo.io/IP
You can also get your ip through cloudflare dns :
dig ch txt whoami.cloudflare @1.1.1.1 +short
You can also just self host this also by adding a line in your Nginx config to return the client IP var. I have ip.domain.ca and curl that. On mobile now but if anyone is interested I'll post my config later.
Would definitely be interested
This is all you need. It'll return your IP in a curl/wget/browser
location / {
add_header Content-Type text/html;
return 200 '$remote_addr';
}
Nice!
They are different, but share the first three numbers.