From owner-freebsd-questions@FreeBSD.ORG Tue Sep 16 04:10:04 2003 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 15CAE16A4B3 for ; Tue, 16 Sep 2003 04:10:04 -0700 (PDT) Received: from mx1.lphp.org (APastourelles-107-1-19-243.w81-49.abo.wanadoo.fr [81.49.208.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D1A243FD7 for ; Tue, 16 Sep 2003 04:10:02 -0700 (PDT) (envelope-from ajacoutot@lphp.org) Received: from lphp.org (ATuileries-108-2-1-148.w217-128.abo.wanadoo.fr [217.128.152.148]) by mx1.lphp.org (8.12.8p1/8.12.8) with ESMTP id h8GBA0AD022942 for ; Tue, 16 Sep 2003 13:10:00 +0200 (CEST) (envelope-from ajacoutot@lphp.org) Message-ID: <3F66EE9C.4010903@lphp.org> Date: Tue, 16 Sep 2003 13:06:04 +0200 From: Antoine Jacoutot User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: 2 internet connections X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 11:10:04 -0000 Hi ! I wanted to know if the following setup could work under FreeBSD, and if so, where should I start to look for information. Basically, I would like my FreeBSD box to be a router for 2 networks and 2 internet connections... nothing fancy yet (no failover nor load balancing) something like that: net 1 --> internet = NAT with internet connection 1 net 2 --> internet = NAT with internet connection 2 net 1 <--> net 2 = simple routing Is it doable ? I'm also concerned about the default gateway here... what should it be ? Someone told me to try a setup like this: ipfw add divert 8668 ip from to any not via tun0 out ipfw add divert 8669 ip from to any net via tun1 out ipfw add divert 8668 ip from any not to any me tun0 in ipfw add divert 8669 ip from any not to any me tun0 in natd -p 8868 -n tun0 natd -p 8869 -n tun1 Thanks a lot for any info you can provide regarding this question. Regards, Antoine