Re: Split 2 ISP connections (GNU/Debian iproute2 network configuration)
From: riviereg (riviereg_at_gmail.com)
Date: 31 Aug 2004 18:10:36 -0700
Thank you very much for this,
I will try it ASAP ...
Before starting, I have another question around my GNU/Debian sarge
How to automaticaly (at boot) set my ip interface with iproute2
instead of ifconfig: I mean, curently, I use /etc/network/interface
How to do this automatically and with a possibility of
I check many discussions auroud this I cannot find something clear for
Thanks a lot,
# The loopback interface
iface lo inet loopback
# The first network card - this entry was created during the Debian
# (network, broadcast and gateway are optional)
auto eth1 eth0 eth2
# local network (LAN)
iface eth0 inet static
# external network (etown WAN)
iface eth1 inet static
iface eth1:0 inet static
AcCeSsDeNiEd <dillon@SpamMinuSaccessdenied.darktech.org> wrote in message news:<email@example.com>...
> You are in luck. I just got this setup after weeks of hunting, asking for help and tweaking.
> First read this: http://linux-ip.net/html/adv-multi-internet.html
> This site brought me closer to my solution.
> Credit given to the poster who pointed me to this site.
> This is what I did:
> #ISP 1 nat (defualt route)
> iptables -t nat -A POSTROUTING -o $ISP1_iface -s ip_net1/bits -j MASQUERADE
> #ISP 2 nat
> $iptables -t mangle -A PREROUTING -s $ip_net2/bits -j MARK --set-mark 5
> $iptables -t nat -A POSTROUTING -o $ISP2_iface -j SNAT -s ip_net2/bits --to-source $ISP2_IPaddr
> #Add the iproute2 and marker/s for ISP2 nat
> /sbin/ip route flush table 5
> /sbin/ip route add table 5 default via ISP2_gw_IPaddrr
> /sbin/ip rule add fwmark 5 table 5
> Good luck.
> On 29 Aug 2004 21:04:58 -0700, firstname.lastname@example.org (riviereg) wrote:
> >I try to loadbalance my 2 ISP connection for my office,
> >but it wasn't a good idea (The line bandwith are too differents).
> >Now, I would like to simply "route" a part of my local network to
> >my first ISP and an other part to my second ISP.
> >Do you know a very simple way to this ?
> >For example, my LAN is 10.0.0.0, my first ISP IP address is 220.127.116.11
> >and my second ISP IP address is 18.104.22.168
> >I would like to send (SNAT) all my customer from 10.0.0.0 ->
> >10.0.0.128 to ISP 1
> >and all others to ISP2. I also would like to do some DNAT on ISP 1.
> >I try some configuration with iproute and iptables2 but it's not
> >Is there a simple example of route (iproute) and NAT (iptable)
> >configuration for this somewhere ?
> >Thank you very much,
> To e-mail, remove the obvious