[Networking] RoseQuartz:
Hi guys,

I spend the last nights on figuring out how to get USB Reverse Tethering running.

My success story setup:

- Router: Normal Internet Router with Ethernet and Wifi

- Phone: LG Optimus G E975 (original ROM !!!, rooted)

- PC: Win 7

Network configuration from top (=WWW) to bottom (=Android Phone):

[WAN Line 1]: Connecting external network (internet) to my router

...[Device 1]: Router; connecting external network (x.x.x.x) to internal network (10.0.0.x, subnet 255.255.255.0)

......[Eth. Line 2]: LAN connection from Router [IP: 10.0.0.138] to PC [IP: 10.0.0.1]

.........[Device 2]: PC running Win 7 - Create a bridge (instruction see below - this is the master trick !)

............ [USB/Eth. Line 3]: Connecting PC with Phone in USB Tethering mode

............... [Device 3]: Android Phone [config: IP: 10.0.0.101, default gateway: 10.0.0.138, DNS1: 10.0.0.138]

Creating a bridge on PC Win 7:

Basic situation on the PC would be such as:

- if you connect PC to Router - this is Physical Ethernet Port with IP let's say 10.0.0.1/24 => network 1: 10.0.0.x

- if you connect Phone to PC - this is RNDIS (USB) Ethernet Port with IP let's say 192.168.42.129/24 => network 2: 192.168.42.x

- if you know want to get from network 1 (Phone to PC) to network 2 (PC to Router and to Internet) the PC must do a routing function - if not - the whole thing will fail.

Pretty Easy Solution to overcome routing problem/risk:

- Create a bridge between Physical Ethernet Port and RNDIS Ethernet Port

- How to: Mark both adapters (Physical Eth. and UBS Eth.) => right click => "German: Verbindung überbrücken" (engl.: Bridge connection or similar)

- Now the PC melts both, the Physical Eth. Port and the USB-Eth.-Port to only 1 Ethernet Port! (configure IP: 10.0.0.1)

This means:

- We can work with only 1 network, PC has no router function, Android Phone can directly ping Router because now it is in the same network 10.0.0.x

- Router's IP 10.0.0.138/24 => works as gateway and DNS1 for all devices in network 10.0.0.x

- PC's bridge Eth. port IP 10.0.0.1/24, configure default gateway and DNS1 => 10.0.0.138 (Router)

- Phone's IP 10.0.0.101/24, configure default gateway and DNS1 => 10.0.0.138 (Router)

Test it:

- ping PC on 10.0.0.1

- ping Router on 10.0.0.138 (if that works you can already open a bottle of vine :D)

- ping IP from external network (internet): e.g. xda-developers.com-Server-IP :D

- ping a domain if address resolution (DNS-server) works: e.g. www.xda-developers.com

If all that works - enjoy USB Reverse Tethering on your Android phone.

Many Apps don't work without Wifi ...

=> for that install Xposed Framework + Xposed Fake Wifi Connection

=> this makes an App believe Wifi is connected

enjoy :)

------------------------------------------------------------------------------------------

Now comes the BUT:

- This works fine with LG-phone + original ROM + root! :)

- This DOES NOT work with LG-phone + Cyanogen Mod 10.2 ROM + root! :(

I even found the problem why it fails but I can't solve it:

[Using Original ROM]:

- From LG-Phone I can ping PC or Router or external IP immediately after setup (PC, Router, Internet-IP)

[Using CM 10.2 ROM]:

- From LG-Phone I cannot ping PC, I cannot ping Router - all devices are in the same network!

- If I know give a 1st ping from another device, e.g. PC => LG-Phone - then I can also ping back from LG-Phone

- It seems as LG-Phone can only ping 'back' once it has received a ping from another device - why that?

- The reason can be found in the ARP-table - which lists IP-address to physical MAC-address of network device:

normal entry should look like: 10.0.0.1 (PC) 02:93:5f:2c:92:34 (=> ping is possible to this device)

incomplete entry looks like: 10.0.0.138 (Router) ..................................... (=> ping not possible, because of missing mac-address)

- If I now manually create an ARP-entry such as:

busybox arp -s 10.0.0.138 02.03:7f:92:12:33

then the thing works for this device! - I can successfully ping and have connection

- Summary: If LG-phone gets a ping from another network device - the LG-Phone collects the MAC-address - and after that the ARP-entry is OK - then LG-Phone can ping the device back and reach it via Ethernet

The problem now is:

- I cannot mantain the ARP table for all IP-addresses on the whole world :)

- and: I cannot wait to get a ping from any other device in the world - until I can communicate back :)

Does anybody have an idea what goes wrong here?

Is it a security related problem?

Or is it rather a network-problem (ARP resolution) caused by CM 10.2 ROM?

Best from Vienna

RoseQuartz

Why I need USB Reverse Tethering?

I am Electro-Hyper-Sensitive; cannot use phones, WIFI, etc. etc. - stupid thing - I know

:)