From owner-freebsd-questions@FreeBSD.ORG Mon Apr 4 00:47:41 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 0DECF16A4CE for ; Mon, 4 Apr 2005 00:47:41 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D41843D46 for ; Mon, 4 Apr 2005 00:47:40 +0000 (GMT) (envelope-from gibblertron@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so1051047rnf for ; Sun, 03 Apr 2005 17:47:40 -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=q6g5A29NV+uis5BCbldI39yWfNn/3kC5AjdxI4WodeyjBCsL+fMtUcwnDca+oyNInAcTkJMSY+g9EeExTW2O1YSA49KW6XSIfpfzmNVLWG6NvdhYqzCXBYAnNQw92mcwdrXKBukZYxPfr62hyZr0BRg/eI8dZlBOws8bIegsHe0= Received: by 10.38.1.73 with SMTP id 73mr4324105rna; Sun, 03 Apr 2005 17:47:40 -0700 (PDT) Received: by 10.38.79.52 with HTTP; Sun, 3 Apr 2005 17:47:40 -0700 (PDT) Message-ID: Date: Sun, 3 Apr 2005 17:47:40 -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:47:41 -0000 And one more bit of info that might be helpful to know... The jail I've setup will serve sites on various IP addresses. Since FreeBSD jails by default only allow one IP, I've given the jail an internal IP, and am just forwarding the desired ports on the external IPs into the jail's IP using ipfw. This is all working fine, so the only thing left for me to solve is how to get things in my jail working so that I can make outbound TCP connections. Thanks again, 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 >