0

I have a Nexus 4.

On my home broadband connection (NATed), I'm unable to access my server via WiFi on the phone. I can ping my server from phone's adb shell, but wget http://<ip>/ fails. The exact same command works from my desktop, except that it's connected via LAN.

What's more weird is, when I try accessing my server after connecting to a VPN on phone, it works. There's no issue with web server configuration obviously because it's working via VPN. It just doesn't when I'm connected to my home WiFi. I've tried restarting routers and stuff, that doesn't help.

What could be the issue?

3
  • How exactly does the wget "fail"? Do you get "Connection refused" immediately? Does it time out? Does it successfully connect but then give you a 403 Forbidden? Being able to ping it suggests that it's not a problem at the routing layer, but it could be a firewall issue on the server, blocking the IP of the phone for whatever reason. Or maybe the phone connected to the wifi on IPv6 and the server is IPv4-only. Hard to say without more info from you. Mar 23, 2014 at 17:52
  • Timeout. IPV6 is not supported by my router. My router connects to isp via pppoe so there's one single ip publicly visible. Phone, desktop etc connect to the private network which is NATed by the router.
    – Nilesh
    Mar 23, 2014 at 17:53
  • Something is extremely strange. I'm unable to access my server from any android device connected to home wifi, but it works when I connect to the same wifi using a laptop.
    – Nilesh
    Mar 24, 2014 at 2:23

1 Answer 1

0

The best answer to this problem seems to be a buggy router.

To debug this problem, I set up my machine as a forwarding router (iptables TEE target) and set the default route on phone to my machine.

I'm able to access it then.

And now when I change the default route again on my phone to my router, it starts working.

Extremely strange.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .