I would like to be able to use my android phone as a backup internet connection if my home broadband goes down.

The idea is that if the network went down I would set up a static route on my home router to point all internet-bound traffic at the phone, and all the other devices on my LAN would be able to carry on using the internet without reconfiguring each one.

How can I get my android phone to perform IP forwarding/NAT from the wlan0 over the mobile data network? I don't want to put the phone into access point mode, but rather leave it connected to my home wifi network.

The phone is rooted so it feels like this should be possible with iptables but I'm not having much luck.

  • Commenting mostly to follow this, but I honestly don't think this is really possible as your stating it... You would have to have it hotspot mode, or wired USB tether mode (some routers support this), otherwise Android just won't allow this to happen, root or not.
    – acejavelin
    Commented Jun 11, 2022 at 17:06
  • 1
    @acejavelin I was able to get this working on my rooted Android 10 phone as mentioned in my answer. I believe the steps should be more or less same for all Android devices with changes in names of interfaces, routing tables, iptables chains, etc. @ Oenotria yes, I have used my phone's internet connection as a backup connection in my home router using a static default route with a higher metric than my main default route, and it works flawlessly as long as my changes are active on the phone. Commented Jun 12, 2022 at 5:23
  • Try to simplify this answer for your use case. Yeah I know it's for hotspot but the network interface is same in both cases. If you can't make it work I'll write an answer when I get time. Commented Jun 12, 2022 at 17:31


You must log in to answer this question.

Browse other questions tagged .