Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Before going into main question, we do know that :

Now the question is :

"Is there a way to share the reverse-tethered internet (as we known connected via usb0 interface) via "Android WiFi Hotspot?"

To make it easier, here's the schema:

Schema of my setup (click image for larger variant)

*Additional Notes :

  • Actually I don't give a limit which version of the Android (so if it's just compatible in higher version e.g. 4.2, it's okay for me), but I prefer it works on 2.3.x (Gingerbread)

  • Some explanations of how to make APN (Infrastructure Mode) on Android (just like Wireless Router/[netsh wlan hostednetwork] on Windows 7/8) might be really helpful too.

  • And also some explanations about how to masquerade (internet sharing) between two interfaces in Android. (such as ICS in Windows or Masquerade/iptables thingy in Linux-based)
share|improve this question
possible duplicate of How to set up reverse tethering over USB? – t0mm13b Aug 14 '13 at 8:38
@t0mm13b No. The OP doesn't want to know how to set up reverse tether, but how to share that connection to other devices. – Izzy Aug 14 '13 at 8:49
@Izzy - is there anyway of reversing it (to undo the v-c)? :( – t0mm13b Aug 14 '13 at 8:55
@t0mm13b unfortunately no. I'm just voting to LO (Leave Open) now. Hopefully other voters read the comments and do the same. As long as there are no further VTCs, yours then will expire. – Izzy Aug 14 '13 at 8:58
yeah, that's quite different that just reverse tether.. it's more advanced which, after you tether, you do "masquerade" sharing from usb0 into wlan0 and broadcast that as wifi hotspot. i understand that mistake that pretty "similar". please let LO this one. thanks in advance. – SECTION Aug 14 '13 at 9:37
up vote 4 down vote accepted

I managed to make it work. Here is an "OSI-like" diagram of my setup, if it makes sense:

 ____________________   ______________________________    ____________
|   LinuxVM <----+  |  |                              |  |            |
|  VirtualBox    |  |  |                              |  |            |
| Windows7(host) |  |  | +--> AndroidPhone <-------+  |  | +-->Laptop |
|  (USB)         +-------+   (USB)  (wifi-HotSpot) +-------+   (wifi) |
|___________________|  |______________________________|  |____________|

The script is located at the XDA forum:

## 0.a. Connect android-phone to PC through USB.
## 0.b Enable Settings|...|Tethering 
##  (so that the device gets detected by the PC's kernel, you should see the following with 'dmsg':
##         [    3.976599] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:00:0b.0-1, RNDIS device, 4e:d5:8c:7b:4f:5a
## Enable Settings|...|Wifi-Hotspot

## Setup usb reverse-tethering.
#  from:
#  Yours device might be 'rndis0' or something else.  Check by just typing 'netcfg'.
netcfg usb0 dhcp
busybox route add default gw dev usb0

## Disable mobile-data.
busybox ifconfig rmnet_usb0

## Masquerade through USB.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE

## Set DNS (if neccessary, ie google's
setprop net.dns1 XX.YY.ZZ.WW
share|improve this answer
man.. the wait is over. this is the godlike answer XD Thanks a lot :) – SECTION May 24 '14 at 6:17
Excuse me, would you please tell me where to write and execute this script to allow wifi tethering while reverse tethering from usb? And please, is it a one way process or is it temporal? – user32844 Oct 21 '14 at 23:14
1. it's temporal. it breaks if any of interface down (offline) or restarted. 2. write this script via text editor and save it as <filename>.sh, execute it via terminal (emulator). – SECTION Sep 20 '15 at 13:21
I able to access PC internet in android mobile using "AndroidTool.exe" tool now can anyone tell me what is next step to share the internet using wifi-HotSpot to other devices. above command tried still no success. – Rikin Patel Apr 26 at 9:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.