local and international adsl split
this tutorial explains how you would split your international and local traffic across 2 adsl accounts on 1 line.
i currently have a 3GB account for international and a 10GB local for local.
i am running my firewall/router at home on debian so your installation process will be different if you are using anything else other than debain or ubuntu.
firstly you need to install the ppp software.
apt-get install ppp ppp-dev
next we need to edit the configuration files to add the international and local accounts.
vi /etc/ppp/pap-secrets
in this file you will add your 2 accounts
“username@isp1″ * “password1″
“username@isp2″ * “password2″
then we need to create the 2 ppp files
cd /etc/ppp/peers
cp provider dsl-isp1-3GB
cp provider dsl-isp2-10GB
then we edit those files to add the username
vi dsl-isp1-3GB
user “username@isp1″
vi dsl-isp2-10GB
user “username@isp2″
now we can start up the accounts
pppd call dsl-isp1-3GB
pppd call dsl isp2-10GB
now because both accounts create it’s own default gateways over the devices, e.g ppp0 and ppp1 we have to just give 1 default gateway
route del default gw 0.0.0.0 dev ppp1
now you have 2 network interfaces called ppp0 and ppp1. the next step is to add the local routes to the routing table. i got the list somewhere and just added it to a .txt file. so it looked something like this
cat /opt/scripts/routes.local.txt
…
17.255.248.0/23
32.106.152.0/24
32.106.153.0/24
32.107.9.0/24
32.238.152.0/24
32.238.153.0/24
32.239.182.0/24
…
then i created a bash script.
vi /opt/scripts/routes.local.sh
while read i; do route add -net $i dev ppp1 ; done < /opt/scripts/routes.local.txt
and then execute the script
sh /opt/scripts/routes.local.sh
you should now have all your local traffic passing through the ppp1 interface which is your local adsl account.







February 9th, 2010 at 10:14 am
well done, I have a similar tut/setup with 2 dsl routers, takes up much less space than a firewall box and is independant … catch u later bud
February 9th, 2010 at 1:17 pm
well, i use my firewall machine for other things too ^.^
but i might flog my firewall machine and get a mikrotik router instead! little beasts they are!