Packet forwarding between USB Tethering and Wifi on Android I have Toshiba notebook with embedded wifi adapter 2.4Ghz, desktop without embedded wifi adapter and Samsung Galaxy smartphone with Mobile HotSpot feature also on 2.4Ghz. Smartphone is connected to Internet through mobile operator. I need provide internet access for notebook and desktop through smartphone and combine them in network, so I will be able to ping notebook from desktop and vice versa.

I have bought TP-Link Archer T1U usb wifi adapter for my desktop and found that it supports only 5Ghz bandwidth. Yeah.. shit happens. But also I have old rooted Samsung Galaxy SM-T211 tablet with USB Tethering feature. So I   switch on Mobile HotSpot on smartphone and connect notebook to smartphone through wifi. Then I connect tablet to smartphone also through wifi. Finally I switch on USB Tethering feature on tablet and connect desktop to it through usb cable. Network schema is shown below.

All devices have internet access. Seems good, except I can't ping desktop(192.168.42.56) from notebook(192.168.43.24).

Forgot to mention, I use ArchLinux on both desktop and notebook.
I have found the solution.

First, I add routing for 192.168.52.0/24 net via 192.168.53.224(tablet) on notebook:



$ sudo ip route add 192.168.42.0/24 via 192.168.43.224 dev wlp5s0


Second, flush all the chains in ip table on tablet through Android Terminal Emulator. Tablet is rooted, so it is not a big problem:



$ su
# iptables -F


That is all. Now notebook can ping desktop and vice versa.