[PLUG] How do I use a tablet WiFi hotspot for my desktop machine?
Dick Steffens
dick at dicksteffens.com
Mon Jul 25 00:05:19 UTC 2016
On 07/23/2016 03:56 PM, Russell Senior wrote:
> You don't need the gateway or dns-nameservers. The laptop's default
> gateway will be set by its wlan interface DHCP lease.
>
> So, just:
>
> auto eth0
> iface eth0 inet static
> address 10.253.0.1
> netmask 255.255.255.0
> network 10.253.0.0
>
> The network part (i.e. 10.253.0) should be different than what your
> mobile hotspot is providing, and different than what your Buffalo is
> providing. Otherwise, it can be anything in the 10.x.y.z range or
> 192.168.x.y range that doesn't conflict. The .1 as the host part is
> traditional for a gateway router (though tastes vary), which your laptop
> is for the Buffalo.
I used your example.
The mobile hotspot gave wlan0 on the X200 an address of 192.168.43.206.
I can access the Internet from the X200.
The Buffalo router serves 192.168.0.xxx.
> You want to have an iptables rule on the laptop to do the NAT. Assuming
> the wireless inteface is wlan0, then:
>
> iptables -t nat -I POSTROUTING -o wlan0 -j MASQUERADE
>
> That will handle the routing back to your Buffalo.
Done. Is that something that goes away when the laptop is shut down?
>
>> [...] I know I have to install isc-dhcp-server on the X200 before I
>> can connect the router to it.
> A simpler alternative is to log in to the Buffalo and give it a static
> configuration on its WAN interface as well, for example:
>
> ip: 10.253.0.2
> netmask: 255.255.255.0
> gateway: 10.253.0.1
> dns: 8.8.8.8 (or whatever you like)
I'm trying the simpler solution and have set the router's WAN interface
to static, with the above details. I did a Save and Apply from the LuCI
interface on the router.
Before that the WAN showed that it was not connected. After changing it
to static I clicked the Connect button. It does show as connected, now,
but I can't reach the Internet from the other laptop connected to the
router.
I must have missed something. Any ideas what?
--
Regards,
Dick Steffens
More information about the PLUG
mailing list