From owner-freebsd-current@FreeBSD.ORG Mon Apr 3 20:37:30 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 623F616A400 for ; Mon, 3 Apr 2006 20:37:30 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98B2E43D45 for ; Mon, 3 Apr 2006 20:37:28 +0000 (GMT) (envelope-from stb@lassitu.de) Received: from [127.0.0.1] (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.4/8.12.9) with ESMTP id k33KbKWV045729; Mon, 3 Apr 2006 22:37:21 +0200 (CEST) (envelope-from stb@lassitu.de) In-Reply-To: <17457.4249.383686.765032@roam.psg.com> References: <17457.4249.383686.765032@roam.psg.com> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Mon, 3 Apr 2006 22:36:44 +0200 To: Randy Bush X-Mailer: Apple Mail (2.746.3) Cc: FreeBSD Current Subject: Re: natd when doubled X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2006 20:37:30 -0000 Am 03.04.2006 um 14:10 schrieb Randy Bush: > i am in a hotel which gives me an address from 10/8 on the ether. > i have it plugged into em0 on a -current system. > > i have another machine on wireless out the ath0 port which is > configured as 192.168.0.1 > > my natd.conf is > > dynamic yes > unregistered_only yes > interface em0 > > my ipfw.rules sez > > add divert natd all from 192.168.0.0/24 to any via em0 > add divert natd all from any to 192.168.0.0/24 via ath0 natd works on the outbound interface, so "divert natd from any to any via em0" should be just the right thing. Packets originating on em0 will be left alone by natd, and replies that natd doesn't know how to handle will be processed as if natd hadn't been in the loop (modulo - deny_incoming). Also, make sure forwarding is enabled. As long as packets received on ath0 will be routed out on em0, and the return route via ath0 is set correctly, it should work. This would be a standard setup for a cable modem or ADSL with direct ethernet (as opposed to PPPoE or PPPoA). HTH, Stefan -- Stefan Bethke Fon +49 170 346 0140