[ubuntu-za] ADSL Traffic

Nic Roets nroets at gmail.com
Mon Feb 1 18:47:01 GMT 2010


On Mon, Feb 1, 2010 at 5:51 PM, Bill Cairns <cairnsww at gmail.com> wrote:

>
> Please! It sounds like a good way to go.
>
>
Modem: I have a Billion. Under "Quick Start" select pure bridge LLC
This means most of functions like DHCP, "Virtual server" etc. will no longer
work.

On ubuntu:
I assume your ethernet is already configured with a static IP (192.168.1.201
in my case) and is called 'eth0'.

Set up PPPoE. There is a since tutorial on the web and a nice interactive
utility to set it up. You just give it your telkom username and password and
it puts it in /etc/ppp/chap-secrets. But I'll paste some of my files below.

If you type pon dsl-provider, your Linux box should be on the net. To let it
share it's connection, type the commands in rc.local (below). Somewhere in
Ubuntu, they change /proc/sys/net/ipv4/ip_forward to 1. If it does not
happen automatically, add 'echo 1 >/proc/sys/net/ipv4/ip_forward' to
rc.local.

To let Linux "broadcast" the router and DNS settings, you need to set up
'dhcp3-server'. I hardcode the DNS values because Telkom will rarely change
them.

Then you need to set up bandwidthd on eth0. It has a nasty habit of falling
over and then you must restart it:
service restart bandwidthd

You can view the graphs in /var/lib/bandwidthd/htdocs/, or you can install
apache-httpd and tell it to serve the files. The you can view them with by
pointing your web browser at http://192.168.1.201/

Regards,
Nic

PS: Sorry for top posting earlier.

/etc/ppp/peers/dsl-provider:
=================
noipdefault
defaultroute
replacedefaultroute
hide-password
#lcp-echo-interval 30
#lcp-echo-failure 4
noauth
persist
#mtu 1492
#persist
maxfail 0
#holdoff 20
plugin rp-pppoe.so eth2
usepeerdns
user "onlineNNNNN at dsl512telkomsa.net"

/etc/ppp/ppp_on_boot:
==============
#!/bin/sh

PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
export PATH

modprobe -q pppoe

exec pppd call dsl-provider

/etc/rc.local
=======
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o ppp0 -j MASQUERADE


/etc/dhcp3/dhcpd.conf
==============
...
option domain-name "x.x";
option domain-name-servers 196.43.50.190, 196.43.53.190;
option routers 192.168.1.201;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.13 192.168.1.120;
}

/etc/bandwidthd/bandwidthd.conf
=====================
subnet 192.168.1.0/24

dev "eth0"

/etc/apache2/sites-enabled/000-default
========================
NameVirtualHost *
ServerName rational.co.za
<VirtualHost *>
        ServerAdmin nroets at gmail.com
        DocumentRoot /var/lib/bandwidthd/htdocs
        <Directory />
                Options FollowSymLinks Indexes
                AllowOverride None
                Order Deny,Allow
                Deny from all
                Allow from 192.168.1
        </Directory>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-za/attachments/20100201/6e394e04/attachment.htm 


More information about the ubuntu-za mailing list