From owner-freebsd-net@FreeBSD.ORG Fri Nov 14 11:07:19 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5C9016A4CE for ; Fri, 14 Nov 2003 11:07:19 -0800 (PST) Received: from modernage.dns-safe.com (ns3.dns-safe.com [64.62.137.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 652F643FB1 for ; Fri, 14 Nov 2003 11:07:18 -0800 (PST) (envelope-from jason@dixongroup.net) Received: from md-wmnsmd-cuda1-c8c-27.chvlva.adelphia.net ([68.170.95.27] helo=uniauth1.corp.digex.com) by modernage.dns-safe.com with esmtp (Exim 4.24) id 1AKjHq-0000uc-JR for freebsd-net@freebsd.org; Fri, 14 Nov 2003 13:06:56 -0600 From: Jason Dixon To: freebsd-net@freebsd.org In-Reply-To: <1068831665.2775.33.camel@lappy.fuzzypenguin.net> References: <1068789760.2775.18.camel@lappy.fuzzypenguin.net> <1068813508.814.4.camel@localhost> <1068831665.2775.33.camel@lappy.fuzzypenguin.net> Content-Type: text/plain Organization: DixonGroup Consulting Message-Id: <1068836821.2775.42.camel@lappy.fuzzypenguin.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 14 Nov 2003 14:07:01 -0500 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - modernage.dns-safe.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dixongroup.net Subject: Re: Static route via address, not interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2003 19:07:19 -0000 On Fri, 2003-11-14 at 12:41, Jason Dixon wrote: > I'm attempting to create a static route for my FreeBSD host so that > *all* local traffic is routed across the gateway firewall, rather than > being delivered on the local network segment, as is the default with > LANs. If you view the routing table (below) again, you'll notice that > traffic from the FreeBSD box (192.168.0.53) to another box on the same > subnet (192.168.0.42) is still being delivered locally, rather than > being routed through the gateway (192.168.0.1). This is *after* I've > added a static route for 192.168.0.0/24 to use 192.168.0.1. Sorry for the self-reply, but I noticed some interesting behavior. Using the "static_routes" entry in rc.conf, I noticed that the following has no effect... static_routes="test" route_test="-net 192.168.0.0/24 192.168.0.1" But this works great, on a host-by-host basis... static_routes="test" route_test="-host 192.168.0.42/32 192.168.0.1" Obviously, this doesn't scale. Can anyone think of a way to override the local routing behavior? Thanks! -- Jason Dixon, RHCE DixonGroup Consulting http://www.dixongroup.net