From owner-freebsd-questions@FreeBSD.ORG Tue Jul 25 17:49:44 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79E9116A4DD for ; Tue, 25 Jul 2006 17:49:44 +0000 (UTC) (envelope-from freebsd@bsdserver.com.br) Received: from nitrobsd.bsdserver.com.br (dns.bsdserver.com.br [200.215.210.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E10F43D7B for ; Tue, 25 Jul 2006 17:49:39 +0000 (GMT) (envelope-from freebsd@bsdserver.com.br) Received: from webmail.bsdserver.com.br (localhost [127.0.0.1]) by nitrobsd.bsdserver.com.br (8.13.6/8.13.6) with ESMTP id k6PHnb52040271 for ; Tue, 25 Jul 2006 14:49:37 -0300 (BRT) (envelope-from freebsd@bsdserver.com.br) From: "Rafael Aquino" To: freebsd-questions@freebsd.org Date: Tue, 25 Jul 2006 14:49:37 -0300 Message-Id: <20060725174937.M70087@bsdserver.com.br> References: <200607250737.54118.rapopp@eastcentral.edu> X-Mailer: OpenWebMail 2.52 20060502 X-OriginatingIP: 200.96.72.178 (bsdserver) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Subject: Re: Multiple gateways? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 17:49:44 -0000 Hi there, With ipfw you can do multiple diverts and natds on different ports, choosing which traffic will use wich gateway by source or destiny. xl0 = 192.168.1.2 -> gw 192.168.1.1 xl1 = 10.0.0.2 -> gw 10.0.0.1 ... add divert 8669 ip from any to 192.168.1.2 via xl0 in add divert 8669 ip from 172.16.0.0/16 to any 80 via xl1 out add fwd 192.168.1.1 ip from 192.168.1.2 to any add divert 8668 ip from any to 10.0.0.1 via xl1 in add divert 8668 ip from 172.16.0.0/16 to any via xl1 in ... Suposing your default gateway is 10.0.0.1 and alternative gateway is 192.168.1.1 and your network is 172.16.0.0, with this rules your web requests are going through alterative gateway, and all the rest through default gateway Another way is using pf, where you can even do a round robin use of both gateways, as in http://www.openbsd.org/faq/pf/pools.html. []'s -- Rafael Mentz Aquino BSDServer Ltda. 51 - 9847 8825 ---------- Original Message ----------- From: "Atom Powers" To: rapopp@eastcentral.edu Cc: freebsd-questions@freebsd.org Sent: Tue, 25 Jul 2006 08:18:02 -0700 Subject: Re: Multiple gateways? > You need to have only one default gateway. > But you can use routed to configure other gateways. > Note: without a routing daemon all your gateways are default > gateways, this will almost certainly cause you problems. > > On 7/25/06, Reuben A. Popp wrote: > > Hello all, > > > > Another quick question here.. I have a box with dual gb nics and I was curious > > if there was a relatively easy way to connect it to two separate gateways. > > For example, em0 is configured to be 10.223.223.223 with a gateway of > > 10.223.223.254 and em1 is configured to be 10.224.224.224 with a gateway of > > 10.224.224.254. > > > > TIA > > Reuben A. Popp > > > > Information Technology Department > > East Central College > > 1+ 636 583-5195 ext 2480 > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions- unsubscribe@freebsd.org" > > > > -- > -- > Perfection is just a word I use occasionally with mustard. > --Atom Powers-- > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" ------- End of Original Message -------