On 03/02/2011, Peter Flynn <peter at silmaril.ie> wrote:
Hi there,
by now there's a few responses-to-responses on the list, which
suggests that you've been given some advice, but nothing I can see
says that you've got the answer you were looking for. So just in case
you're still wondering, I'll give it a go...
> Requirement: I have to give a training course in a room with no network
> connection of any type. Students will all have wifi-enabled laptops, but
> few if any will have 3G dongles.
>> What I have: an Ubuntu 10.4 Dell Latitude D610 laptop with an Ethernet
> port; a HTC Hero which works nicely as a 3G connection when cabled to
> the laptop via USB, but which is not capable of running Froyo; and an
> old WiFlyer pocket wifi AP router (eg
>http://www.mobiletechreview.com/tips/WiFlyer.htm)
>> I want to set the laptop so that it will forward the IP connection from
> the phone on the USB port, out of the Ethernet port and into the
> WiFlyer, which will broadcast to the users. It will be slow, of course,
> but better than nothing.
It sounds like it should all Just Work.
The wiflyer web page describes how you may want to set passwords and
the like on that device; but fundamentally it should work as the
wireless access point and NAT the traffic through to its outside.
On the laptop, you set the USB 3G connection as the default gateway.
You statically configure an ip address and mask on eth0. And, as per
https://help.ubuntu.com/community/Internet/ConnectionSharing, in
NetworkManager you go "eth0", "Edit", "IPv4 Settings", "Shared to
other computers". (That adds the iptables nat rules that you want.)
Then either you configure a dhcp server on the laptop to feed ip /
mask / gateway / dns to things on the eth0 network (expecting there to
be only one); or you manually configure the outside of the wiflyer to
have the same mask as eth0, a gateway of the eth0 address, an ip on
the same network, and a dns server that works.
For dns server address, use your ISP one, or find the opendns one, or
use the google one; whichever you like best.
If you choose to use a laptop dhcp server, I like dnsmasq.
> I suppose it's too much to hope that
> the laptop itself could act as an AP (without having to go through the
> WiFlyer).
"The Web" suggests that the laptop has an intel wireless chip; and
http://linuxwireless.org/en/users/Drivers suggests that that chip
doesn't work in "master" mode. So you could try it, to see if that
page is out of date; but I'd suggest just sticking with plan A.
With the wiflyer connected to the laptop connected to the phone, if
you have another wireless machine, you can test and confirm that it
all works as expected, before showing it to the whole class. That
might be reassuring.
Once that is done, if the course is any way network-security related,
and your students choose not to encrypt their traffic, you could have
an interesting "driftnet"-like display, or else introduce them to the
joys of the upside-down-ternet. All of their traffic is going through
your machine; you are their short-term ISP; they can learn how trusted
their ISP already is.
But that might be considered mean. And it'd certainly be more hassle for you.
Good luck,
f
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!