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.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • FriendFeed
  • LinkedIn
  • Posterous
  • Reddit
  • RSS
  • Slashdot
  • StumbleUpon
  • Tumblr
  • Twitter
  • Blogplay