From owner-freebsd-net Mon Mar 15 9:36: 4 1999 Delivered-To: freebsd-net@freebsd.org Received: from mail.promo.de (mail.Promo.DE [194.45.188.65]) by hub.freebsd.org (Postfix) with ESMTP id 4365515108 for ; Mon, 15 Mar 1999 09:35:45 -0800 (PST) (envelope-from stefan.bethke@hanse.de) Received: from d225.promo.de (d225.Promo.DE [194.45.188.225]) by mail.promo.de (8.8.8/8.8.8) with ESMTP id SAA00961; Mon, 15 Mar 1999 18:34:49 +0100 (CET) Date: Mon, 15 Mar 1999 18:34:49 +0100 From: Stefan Bethke To: Steve Rubin , Jesse Cc: freebsd-net@FreeBSD.ORG Subject: Re: routing based on source address Message-ID: <421040.3130511689@d225.promo.de> In-Reply-To: <19990313234328.A758@tch.org> Originator-Info: login-id=stefan; server=mail X-Mailer: Mulberry (MacOS) [1.4.2, s/n U-301178] MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > On Fri, Feb 26, 1999 at 01:53:50AM -0800, Jesse wrote: >> >> Hi, >> >> I have a box hooked up to a network with access to two seperate lines >> going to two seperate networks (206.x.x.x for link #1 and 207.x.x.x for >> link #2). The machine has IP addresses on both IP ranges. The default >> gateway is 207.x.x.1. >> >> I'm running a server which is bound to a 206.x.x.x IP. However, since = my >> default gateway is 207.x.x.1, it sends all data out on link #2 but >> receives incoming data over link #1. This means that if either link #1 = or >> link #2 is down, I'm effectively dead in the water. >> >> Is there any way to tell my box that for all data going out of it with = a >> /source/ address of 206.x.x.x should be sent through the 206.x.x.1 >> gateway? I know I can do this based on destination, but I have no clue >> how to do it based on source (and unfortunately I can't predict the >> addresses of all the clients I'll be communicating with). If you're running 3.0 or later, try ipfw(8) and look for the 'forward=B4 action. A rule like # ipfw add ip from 206.x.x.y to any forward 206.x.x.1 should forward all packets originating in 206.x.x.y to the gateway on the 206.x.x.y network. If you have locally attached machines, or more than = one gateway, I would guess it doesn't work. HTH, Stefan -- M=FChlendamm 12 | Voice +49-40-256848, +49-177-3504009 D-22089 Hamburg | e-mail: stefan.bethke@hanse.de Germany | stb@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message