[PLUG] How do I use a tablet WiFi hotspot for my desktop machine?

Russell Senior russell at personaltelco.net
Thu Jul 21 06:59:25 UTC 2016


>>>>> "Russell" == Russell Senior <russell at personaltelco.net> writes:

>>>>> "Dick" == Dick Steffens <dick at dicksteffens.com> writes:
Dick> I may need to be without Comcast for a time. Is there a way to use
Dick> a tablet WiFi hotspot and a laptop to feed my router so I can
Dick> support two desktops?

Dick> We got a small tablet from Verizon before going on a trip in
Dick> June. It works well as a WiFi hotspot to connect our laptops. But
Dick> since our desktops don't have radios, I'm hoping there's a way to
Dick> make one of my laptops serve my router so I can continue to serve
Dick> our desktops. I assume I'll need to install and configure
Dick> something to be a DCHP server so the router can get an address
Dick> from the laptop.

Dick> To save on Verizon data usage, I probably won't leave the tablet
Dick> connected to Verizon all the time. Is there something I'll need to
Dick> do on the laptop so that it doesn't try to connect to the router
Dick> when the tablet is off? Or maybe I don't actually turn the tablet
Dick> off, but just disconnect it from Verizon.

Dick> Advice appreciated.

Oh, and yes (actually reading what you wrote), running it through a
laptop can work.  Laptop wifi connects to your mobile hotspot, ethernet
connects your laptop to the WAN port on a router (or directly to a
switch or desktop machine), give the ethernet interface a static IP on a
different network from the mobile hotspot, e.g. 192.168.11.1/24, then run
the command:

  iptables -t nat -I POSTROUTING -o wlan0 -j MASQUERADE

(where wlan0 is your laptop's wireless interface connecting to the
mobile hotspot).

Then you'll need to run a DHCP server providing leases on the ethernet
interface only, and you are done.

You could do something similar with a router running OpenWrt in place of
the laptop, with the radio in client mode, acting as the WAN interface.
There, you have the nice advantage that the router already has a DHCP
server built in.

The key is to avoid trying to put a client-mode interface into a network
bridge with anything.  That is disaster, don't go there.  Routing works
fine, so use it and MASQUERADE'ing (i.e. NAT).


-- 
Russell Senior, President
russell at personaltelco.net



More information about the PLUG mailing list