From owner-freebsd-questions@FreeBSD.ORG Tue Feb 14 14:44:29 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 52D7416A420 for ; Tue, 14 Feb 2006 14:44:29 +0000 (GMT) (envelope-from ggajic@afrodita.rcub.bg.ac.yu) Received: from afrodita.rcub.bg.ac.yu (afrodita.rcub.bg.ac.yu [147.91.1.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E5B643D48 for ; Tue, 14 Feb 2006 14:44:28 +0000 (GMT) (envelope-from ggajic@afrodita.rcub.bg.ac.yu) Received: from afrodita.rcub.bg.ac.yu (localhost.localdomain [127.0.0.1]) by afrodita.rcub.bg.ac.yu (8.13.4/8.13.4) with ESMTP id k1EEiHTu011772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Feb 2006 15:44:17 +0100 Received: from localhost (ggajic@localhost) by afrodita.rcub.bg.ac.yu (8.13.4/8.13.4/Submit) with ESMTP id k1EEiFLV011769; Tue, 14 Feb 2006 15:44:16 +0100 Date: Tue, 14 Feb 2006 15:44:15 +0100 (CET) From: Goran Gajic To: fbsd@douville.net Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-RCUB-MailScanner-Information: Please contact the RCUB if you have problem with mail X-RCUB-MailScanner: Found to be clean X-RCUB-MailScanner-From: ggajic@afrodita.rcub.bg.ac.yu Cc: freebsd-questions@freebsd.org Subject: Re: IP Routing Question 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, 14 Feb 2006 14:44:29 -0000 Hi, You can try using ipf filter to impose source-policy routing: cat > ipf.example pass in quick on em1 to em1:192.168.1.2 from 10.1.0.0/16 to a.b.c.d/32 ^d ipf -f ipf.example This way you will re-route all packets coming from source 10.1/16 to destination a.b.c.d to go to address 192.168.1.2 not to a.b.c.d Note that you have to rebuild your kernel in order to have options IPFILTER enabled. Regards, gg. >I'm trying to set up the routing table to force requests to certain IP >addresses to use a particular ethernet card. I've used the route command >in a number of >ways, but still can't come up with how to force to use em1 instead of >em0, >with the right gateway.