From owner-freebsd-questions@FreeBSD.ORG Mon Apr 4 00:08:48 2005 Return-Path: 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 B9AAF16A4CE for ; Mon, 4 Apr 2005 00:08:48 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 571B543D2D for ; Mon, 4 Apr 2005 00:08:48 +0000 (GMT) (envelope-from gibblertron@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so1047516rnf for ; Sun, 03 Apr 2005 17:08:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=tDwEK6Hl2579GxdFZQmqFBo3ZD8ZCzdqFLl97gjHlJrunz1Wwhf9SOElo1Y8y0ceCKkcgcALsYkJwtPwcIPFg2R2W1T/PL9uaEfhAb3QzMXfAV8eZCOPZnqSgWOhJlu6wcCel/5QT0UDjUwRuoepRjE1wWX+x5gRXUusHjMXwL8= Received: by 10.38.82.78 with SMTP id f78mr2085552rnb; Sun, 03 Apr 2005 17:08:48 -0700 (PDT) Received: by 10.38.79.52 with HTTP; Sun, 3 Apr 2005 17:08:47 -0700 (PDT) Message-ID: Date: Sun, 3 Apr 2005 17:08:47 -0700 From: patrick To: freebsd-questions@freebsd.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: Subject: Re: Adding a default route for a specific NIC X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: patrick List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2005 00:08:48 -0000 To follow-up, I basically want to say: if traffic originals from 192.168.42.6, use 192.168.42.3 as the default gatway else use default gateway for bge0... Patrick On Apr 3, 2005 4:17 PM, patrick wrote: > I have a FreeBSD 4.11 server with two NICs -- one has a real IP (bge0) > and the other has an internal IP (bge1, 192.168.42.6). > > The default route for the server (defaultrouter= in rc.conf) is the > gateway for the real IP. How can I set a route such that traffic going > out on bge1 goes through a different router, even if it's to the > outside world? > > Basically, I have a jailed setup running with a private IP address. On > the private network, there is a gateway machine that's setup to NAT > the traffic out to the internet. Currently, I cannot get out to the > internet from the jail unless I set the default route of the entire > server to be my internal NAT gateway. > > Any ideas? > > Thanks, > > Patrick >