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

Re: how to connect 2 PCs with cell phone



my android phone offers Internet connection to 2 PCs
one PC is connected to phone thru USB line, tether
the other is connected to phone's WLAN hot spot

it doesn't sound as easy as i thought

i have router that can connect 2 PCs thru ethernet

Thanks anyway!




On Tuesday, April 17, 2018 6:18 AM, Ben Caradoc-Davies <ben@transient.nz> wrote:


On 17/04/18 09:32, Long Wind wrote:

> i have 2 PCs connected to a cell phoneone thru USB line, IP=192.168.42.131the other thru WLAN hot spot, IP=192.168.43.201
> but the 2 can't talk to each other directly(i can't ping from one PC to the other)how to make that happen? Thanks!


Is the phone also connected to the WLAN hot spot or via a cellular data
service? What is the netmask of your WLAN? Do you administer the hot
spot? Is it an ADSL WiFi router?

Both addresses look like RFC 1918 private network addresses
<https://tools.ietf.org/html/rfc1918>
<https://en.wikipedia.org/wiki/Reserved_IP_addresses>. 192.168.42.x is
what I see when I tether my computer to my Android phone via USB. The
phone is then acting as a NAT for the connected computer. The problem is
that 192.168.42.131 is not the IP address of the phone, and incoming
connections will not be forwarded to the phone-connected computer.

If your phone is connected to the WLAN hot spot, you should be able to
make outgoing connections from the phone-connected PC to the
WLAN-connected PC. You will not be able to make connections from the
WLAN-connected PC to the phone-connected PC because it is behind a NAT
(the phone). I do not know if an Android phone can be configured to
forward incoming connections to the connected PC.

If your phone is connected to a cellular data service, then it is on the
public internet and cannot connect to the private IP address
192.168.43.201. Instead, if you administer the hot spot (e.g. and ADSL
WiFi router), configure your WiFi router to forward incoming connections
from your public IP address (e.g. one assigned by your ISP for your
broadband connection) to a port on the PC at 192.168.43.201. Now you
should be able to connect from your phone-connected PC to your
WLAN-connected PC via your router public IP address. If your router has
not been assigned a static IP address by your ISP, you may want to
investigate Dynamic DNS because your router IP address may change
whenever it reconnects.

Ping may not work across networks because many services filter it.

There are other solutions including a VPN which tunnels connections
between a PC and a server on the public internet.

Kind regards,

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





Reply to: