From owner-freebsd-questions@FreeBSD.ORG Wed Mar 14 19:22:48 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 715AF16A401 for ; Wed, 14 Mar 2007 19:22:48 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 4E42B13C483 for ; Wed, 14 Mar 2007 19:22:48 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn01.u.washington.edu (hymn01.u.washington.edu [140.142.8.55]) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2EJMlD3003224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 14 Mar 2007 12:22:48 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn01.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2EJMlAj022761 for ; Wed, 14 Mar 2007 12:22:47 -0700 X-Auth-Received: from [192.55.52.4] by hymn01.u.washington.edu via HTTP; Wed, 14 Mar 2007 12:22:47 PDT Date: Wed, 14 Mar 2007 12:22:47 -0700 (PDT) From: youshi10@u.washington.edu To: FreeBSD Mailing List In-Reply-To: <64CD631E-C04C-498E-A71D-208287D5511D@messier.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.3.14.121433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Subject: Re: per-interface default routes? 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: Wed, 14 Mar 2007 19:22:48 -0000 On Wed, 14 Mar 2007, Mark Messier wrote: > Suppose you have a freebsd box with two LAN interfaces, > one numbered on netA and one on netB... > > Some applications are listening on the netA IP address, some on the > netB IP address. Some applications may be listening on all interfaces > but might have a directive that indicates which IP address to use for > packets sourced from the application, like this: > > query-source address 192.0.2.2 port 53; > > What I want to happen is that packets sourced from the > netA IP address go out the netA physical interface > and packets sourced from the > netB IP address go out the netB physical interface. > > That is, I want per-interface default routes > (is this the correct term?). > > How do I do this? > > Thanks, > -mark Route has more information if you want to setup default routes for interfaces. Either that, or natd will yield a solution for you. -Garrett