From owner-freebsd-questions Tue Oct 9 23:29: 6 2001 Delivered-To: freebsd-questions@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id AAA8637B401 for ; Tue, 9 Oct 2001 23:29:01 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.245.138.251.Dial1.SanJose1.Level3.net [209.245.138.251]) by snipe.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f9A6Sx518960; Tue, 9 Oct 2001 23:28:59 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f9A6Svo02454; Tue, 9 Oct 2001 23:28:57 -0700 (PDT) (envelope-from cjc) Date: Tue, 9 Oct 2001 23:28:57 -0700 From: "Crist J. Clark" To: "John Holstein, IS" Cc: questions@FreeBSD.ORG Subject: Re: gateway and multiple subnets Message-ID: <20011009232857.D387@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <5.1.0.14.2.20011009143853.041e3ec8@pop.cotse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.1.0.14.2.20011009143853.041e3ec8@pop.cotse.com>; from jholstein@cnpapers.com on Tue, Oct 09, 2001 at 02:43:53PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 09, 2001 at 02:43:53PM -0400, John Holstein, IS wrote: > I am setting up a test firewall where I want to pass multiple subnets from > ed0 to the internet connection on ed1. > > For instance: > > 192.168.0.x -----> > 192.168.1.x -----> > -----> ed0 FREEBSD BOX ed1 -------> internet > 192.9.200.x -----> > 192.9.205.x -----> > > What is the best way to go about this, without the use of a designated > gateway on each subnet. > > set the subnet mask of ed0 to 0.0.0.0? > > I don't need to alias the gateway addresses of all the subnets, the subnets > in question are not looking for a particular out... they are being routed > from a cisco router, looking at ed0 to be the out, but the old box that was > in place, a Cisco Pix, was passing everything..... So, are you saying the real picture is, 192.168.0.x -----} 192.168.1.x -----} }--Cisco Router--|ed0 FreeBSD GW ed1|---- internet 192.9.200.x -----} 192.9.205.x -----} If that's the case, you just need to add the routes on the FreeBSD gateway, # route add net 192.168.0.0 # route add net 192.168.1.0 # route add net 192.168.200.0 # route add net 192.168.205.0 Where is the IP address of the router's interface on the network with the FreeBSD box's ed0. To load these at boot, put something like, static_routes="0 1 200 205" route_0="net 192.168.0.0 " route_1="net 192.168.0.0 " route_200="net 192.168.200.0 " route_205="net 192.168.205.0 " In rc.conf(5). -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message