[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to connect 2 PCs with cell phone

On 17/04/18 11:07, Ben Caradoc-Davies wrote:
On 17/04/18 10:46, Long Wind wrote:
my android phone offers Internet connection to 2 PCsone PC is connected to phone thru USB line, tetherthe other is connected to phone's WLAN hot spot
Aha! I had not thought of that. I have never tried it, but bridging might be what you want: https://stackoverflow.com/questions/38346195/android-network-bridge-between-usb-tethering-wifi-hotspot-interfaces You will need a root shell on the phone. /proc/sys/net/ipv4/ip_forward is already set to "1" on my phone.

It works as soon as iptables rules are removed on the phone. This requires root access on the phone.

I connected my laptop to my phone's WiFi hot spot and tethered my desktop over USB. All I had to do was, on my phone, open a terminal, become root, and flush all the iptables rule:

su -
iptables -F

Before iptables rules are flushed, nothing works. Once iptables rules are flushed, everything works including ping and ssh. Iptables rules are restored after phone reboot.

I am running Cyanogenmod 13.0 (Android MarshMallow 6.0.1) on a Nexus 5X. Root access is enabled.

Kind regards,

Ben Caradoc-Davies <ben@transient.nz>
Transient Software Limited <https://transient.nz/>
New Zealand

Reply to: