Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 2004 16:32:17 -0600
From:      Tillman Hodgson <tillman@seekingfire.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Loading balancing with more than one ISP.
Message-ID:  <20040115223217.GQ468@seekingfire.com>
In-Reply-To: <200401151710.01743.ajacoutot@lphp.org>
References:  <20040114163043.GL415@seekingfire.com> <200401141827.30569.ajacoutot@lphp.org> <VEJofc39tg@dmeyer.dinoex.sub.org> <200401151710.01743.ajacoutot@lphp.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040115223217.GQ468>