0

I'd like to know how to best achieve the following: Use my Android phone in the USA as if I were navigating the internet from my Android phone in France.

I'm already able to accomplish simple HTTP proxying by connecting all the mobile devices via a Wireguard server and running the Every Proxy app on the France Android phone.* However some apps don't respect proxy settings so I'm looking for a more robust option.

I assume apps have no choice but to respect VPN settings, so my plan is to force all traffic from the US device over the Wireguard interface (AllowedIPs = 0.0.0.0/0), instruct the Wireguard server to route traffic from the US device to the France device, then set up the France device to enable routing and masquerading so that the US phone reaches the France mobile network.

I don't know how to accomplish the last task (enabling routing and masquerading on the France device.) Can it be accomplished? It seems that I'll need to root the device. Is it as easy as doing

iptables -F -t filter
iptables -P FORWARD ACCEPT 

according to this post?

Any tips? Thanks!


ProxyDroid claims to force all app traffic through a proxy on a rooted device however I'm not sure it works well and I didn't really want to root the US device. Some apps which I want to observe might check whether they are on a rooted device and act differently.

*In the HTTP proxying setup, Wireguard clients are only routing LAN traffic over the VPN (AllowedIPs = 192.168.1.0/24)

1
  • @Tom-yan I'm probably giving up on this, the Android routing is too complex. Instead I will USB tether the Android device to a Raspberry Pi and do the routing on plain ole Linux with Wireguard. ProxyDroid did get me closer, but I did quickly notice that some apps did not work properly.
    – GGGforce
    Commented Apr 11, 2021 at 21:29

1 Answer 1

0

IP forwarding can be enabled with sysctl; iptables might have never been enabled / blocking forwarding or any traffics. (Speaking of that, the kernel you use needs to have the iptables components built.)

Another key is to either perform SNAT/MASQUERADE on the France device with the POSTROUTING chain of the nat table.

Also make sure you stop using AllowedIPs = 0.0.0.0/0 on the France device. Instead you list the subnet(s) the other devices are in.

1
  • Don't expect to work really well anyway as there are often layers of NAT for a mobile device already. Also Android routing is a bit different and it has its own security feature whatsoever (like VPN doesn't cover tethering devices, so there might be more work to be done, if possible at all.
    – Tom Yan
    Commented Apr 8, 2021 at 12:54

You must log in to answer this question.

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