[plug] ppp0 eth internet tablet

Nick Bannon nick at ucc.gu.uwa.edu.au
Mon Aug 20 10:55:08 WST 2012


On Sun, Aug 19, 2012 at 09:01:23PM +0800, wolfbite wrote:
> objective: android to wirless then out onto internet
> setup:   internet -------mobile broadband usb -----------computer
> ------ eth old modemrouter with wireless ------- android tablet
[...]

Let's give the "old modemrouter" a name, say George? You'll be wanting
to disable the smarts on George and just use his wireless access
point/bridge. George probably has an ADSL/phoneline port or uplink/WAN
port - just ignore that and leave it disconnected. On his internal
network he has the wireless radio and three or four ethernet ports on a
switch. Use the tablet to configure George's wireless the way you want
and then turn off his DHCP server.

Write down the network settings. George's DHCP server had probably
given the tablet a private network address; perhaps it's something like
192.168.1.100, the network is 192.168.1.0/24 and George's address (the
tablet's gateway or default route) was 192.168.1.1 . You could manually
set at least those first two settings on the tablet again if you need
to change George, or you could factory reset George if you had to.



Let's give the computer a name, how about Jane? You'll be wanting
to enable routing and NAT to turn Jane into a gateway, and share her
Internet connection. There's a lot of documentation on how to do this
very precisely from the command line, but perhaps you won't need it. Open
up a terminal and save or print out the results you get from running:

  ip addr
  ip route
  cat /etc/resolv.conf
  lsb_release -a

The mobile broadband has probably given Jane a ppp0 device, an address
and default route/gateway. There's probably also eth0, the internal
network - plug that into the internal switch side of George with a Cat5
or Cat6 cable.

If Jane's running Network Manager, the internet connection sharing might
be very simple. On my machine I had to first ensure that the package
"dnsmasq" was installed:
  dpkg -l dnsmasq
(it was not installed, but perhaps it already is for you)
  sudo apt-get install dnsmasq
(dnsmasq get installed and starts running in a default configuration.
This stopped Network Manager from starting it later on.)
  sudo /etc/init.d/dnsmasq stop
  sudo nano -w /etc/default/dnsmasq
...and changing the line ENABLED=1 to ENABLED=0

Afterward you might be able to right-click Jane's Network Manager icon
and then choose "Edit Connections". You can also view the same information
you saved a few minutes ago with "Connection Information".

Edit Jane's Wired connection (probably eth0), look at the IPv4 Settings
and change the method from DHCP (dhcp client, looking for a server
like the one that used to be running on George) to "Shared to other
computers". Now Jane will be handing out addresses using the "dnsmasq"
package, probably different ones to the ones that George was using. See
if there's anything changed with "ip addr", "ip route" (or the "Connection
Information" menu option) and record that as well.

If everything's working, you'll be able to turn the tablet wifi off and
on; Jane will give the tablet new IP network settings, probably different
to the ones George was handing out earlier.



Now, as I said, the more precise approach is included in these following
links and in other places, but tell us how the above stuff works out
first. If there's a problem, include those command outputs that you
saved. There's the traditional Debian-based approach of setting up Jane's
fixed wired interfaces and it's probably easiest to keep that separated
from whatever's handling the mobile broadband setup.

Setting Up a Family Home Network with Access Control:
	http://community.linuxmint.com/tutorial/view/814
Shell tutorial:
	http://community.linuxmint.com/tutorial/view/454
http://blog.noviantech.com/2010/12/22/debian-router-gateway-in-15-minutes/

Looking forward to hear back from you,
Nick.

-- 
   Nick Bannon   | "I made this letter longer than usual because
nick-sig at rcpt.to | I lack the time to make it shorter." - Pascal


More information about the plug mailing list