On Fri, Dec 27, 2002 at 12:55:24AM -0000, Timmer wrote:
> This machine runs a web server (and a few other things), so all that traffic
> must happen on the T1. However, the T1 is significantly slower than my cable
> connection, so I would like the machine to use the cable connection for
> downloading large files and so on.
> Is there any way to configure FreeBSD to essentially have two default
> gateways, and to choose the correct gateway based on the source IP address
> (that is, if I try to FTP from the 192.168.1.2 address, it should send all the
> traffic out the 192.168.1.1 gateway)?
What you are describing is called "Policy based routing" --- under
FreeBSD it's generally implemented using IPWF 'fwd' rules. Eg
ipfw add fwd 192.168.1.1 all from 192.168.1.2 to any out
ipfw add fwd 188.8.131.52 all from 184.108.40.206 to any out
Remember to include 'options IPFIREWALL_FORWARD' in your kernel
config, as well as the other options required to enable ipfw(8).
Searching Google Groups for 'FreeBSD policy based routing' will turn
up any number of articles should you need further information.
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Tel: +44 1628 476614 Bucks., SL7 1TH UK
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message