Loading balancing with more than one ISP.

Tillman Hodgson tillman at seekingfire.com
Thu Jan 15 14:32:20 PST 2004


On Thu, Jan 15, 2004 at 05:10:01PM +0100, Antoine Jacoutot wrote:
> On Thursday 15 January 2004 16:41, Dirk Meyer wrote:
> > Thats easy on your router:
> > #!/bin/sh
> > gateway1="10.10.10.1"
> > gateway2="10.10.10.2"
> > dmz="10.10.20.0/24"
> > lan="10.10.30.0/24"
> > ipfw add fwd ${gateway2} ip from ${dmz} to any
> > ipfw add fwd ${gateway1} ip from ${lan} to any
> 
> Thanks... but the thing is that I already tried this, but I have dynamic IPs 
> and I need NAT...
> I just sent a new mail to the list, if you can check it out, my configuration 
> is explained.

I NAT with IPFilter (ipnat, really) rather than IPFW (natd, really) so I
can't help with IPFW. But in ipnat you can NAT to an interface and thus
it follows IP changes.

Taking my previous example and getting more specific, here's my NAT on
my dynamic IP on an ADSL line to CVSup12 (if you'll recall, my goal was
to eliminate "system" traffic from the main link and thus CVSup was
among the items moved to the ADSL link):

#   ... cvsup12.freebsd.org
map rl2 from 192.168.23.0/24 to 128.46.156.46/32 -> rl2/32

This is a good example because I'm NATing to a specific interface (rl2)
rather than to an IP (which can change with DHCP fairly regularly). But
it's also a bad example because I'm sending traffic to cvsup12 by
specific IP and this will break if they ever change IP's ;-)

Ah well, if that happens the daily email will show it and I'll adjust it
for the next days run. So it works not-too-bad for this application.

-T


-- 
"If you do not feel yourself growing in your work and your life
 broadening and deepening, if your task is not a perpetual tonic
 to you, you have not found your place."
	- Orison Swett Marden {1850-1924 Founder of Success Magazine}


More information about the freebsd-questions mailing list