Diff for "SharingMobileBroadband"


Differences between revisions 1 and 2
Revision 1 as of 2010-05-29 02:10:19
Size: 4806
Editor: 252
Comment:
Revision 2 as of 2010-05-29 02:13:31
Size: 4371
Editor: 252
Comment:
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
* created /etc/wvdial.conf for VirginBroadband - TODO ADD FILE
* edit /etc/ppp/peers/wvdial - added 'defaultroute'
* edit /etc/ppp/options - added '-chap'
 * created /etc/wvdial.conf for VirginBroadband - TODO ADD FILE
 * edit /etc/ppp/peers/wvdial - added 'defaultroute'
 * edit /etc/ppp/options - added '-chap'
Line 78: Line 78:
= hostapd =
hostapd handles the
Line 79: Line 81:

== Subsection ==

= Third Section =

Some sections may just contain a list of links. It is sometimes useful to include a short explanation of what the links are for. For example: 'Ubuntu includes the following Internet applications by default.'

 * <Link> - Lists of links should have bullets. Link text should not be in bold. Each link should be followed by a short explanation of the link.
 * <Link> - Explanations of links should be written as full sentences.

title Setting up Mobile Broadband (via USB dongle) and sharing over wireless

Introduction

This describes how to configure mobile broadband (via a USB dongle or other ppp based) then re-broadcasting this via wireless or wired ethernet. This guide was written for a machine running ubuntu 8.10, but should work for later versions. This is aimed at home servers or appliances - sharing a mobile broadband connection can be more easily done through NetworkManager on recent distros.

Prerequisites

* Mobile broadband connection via USB (actually, you can modify this to work for any sort of internet connection) * Wireless ethernet card that supports Master Mode * Ubuntu (or similar) installation

Install Software

sudo apt-get install wvdial bridge-utils hostapd madwifi-tools wireless-tools dnsmasq ufw

Get broadband connection working

wvdial handles the broadband connection. The following setup was created to work for Virgin Mobile Broadband in Australia:

  • created /etc/wvdial.conf for VirginBroadband - TODO ADD FILE

  • edit /etc/ppp/peers/wvdial - added 'defaultroute'
  • edit /etc/ppp/options - added '-chap'

Create Network Interfaces

edit /etc/network/interfaces

                       iface lo inet loopback

                       #internet connection
                       auto ppp0
                       iface ppp0 inet wvdial

                       #wired
                       auto eth0
                       iface eth0 inet manual

                       #wireless
                       auto ath0
                       iface ath0 inet manual

                       #bridge
                       auto br0
                       iface br0 inet static
                               address 192.168.0.10
                               network 192.168.0.0
                               netmask 255.255.255.0
                               broadcast 192.168.0.255
                               bridge-ports eth0 ath0

In this case, ppp0 is the net connection, eth0 is wired ethernet, ath0 is wireless. ath0 might be something else depending on your wireless card. br0 is the bridge between wired and wireless, so both will appear to be the same network. In this case, the address of the server is 192.168.0.10 as defined in br0. You might want to change this and/or the network address.

Reboot after configuring this (or just bring down, then back up all of the net interfaces).

TODO - Configure ufw

DNS

For some reason, DNS wasn't being configured properly on my setup when booting (although this worked fine when bringing up ppp0 after booting). If this is the case, you can edit /etc/resolv.conf to include:

nameserver YOUR_ISP_DNS1_HERE #replace with your ISPs DNS server
nameserver YOUR_ISP_DNS2_HERE #replace with your ISPs DNS server
nameserver 8.8.8.8 #optional google DNS server for fallback
nameserver 8.8.4.4 #google

dnsmasq

dnsmasq is a lightweight DNS and DHCP server designed for NAT applications. It is included in NetworkManager, but we'll use it standalone; edit /etc/dnsmasq.conf :

server=YOUR_ISP_DNS_HERE  #for DNS server (just in case it doesn't pick up automagically)
...
interface=br0
...
dhcp-range=192.168.0.50,192.168.0.150,12h

hostapd

hostapd handles the

See Also

A see also section can be used to point users towards other trusted Ubuntu resources. For example, if a page exists in the official documentation on http://help.ubuntu.com, you can link to such a page. This section is optional.

  • <Link> - Explanation of link.

  • <Link> - Explanation of link.

  • <Link> - Explanation of link.

External Links

An external links section can be used to point users towards general information about the subject matter of the page, such as a wikipedia entry or project homepage. This section is optional.

  • <Link> - Explanation of link.

  • <Link> - Explanation of link.

  • <Link> - Explanation of link.

SharingMobileBroadband (last edited 2011-03-21 11:00:10 by 146)