From owner-freebsd-questions Tue Oct 8 6:12:26 2002 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 0406837B401 for ; Tue, 8 Oct 2002 06:12:25 -0700 (PDT) Received: from kepa.kepa.fi (kepa.kepa.fi [62.142.22.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA1B643EB7 for ; Tue, 8 Oct 2002 06:12:23 -0700 (PDT) (envelope-from kim.helenius@kepa.fi) Received: from kepa.fi (k1.kepa.fi [62.142.22.208] (may be forged)) by kepa.kepa.fi (8.12.3/8.12.3) with ESMTP id g98DCHTV000488 for ; Tue, 8 Oct 2002 16:12:17 +0300 (EEST) (envelope-from kim.helenius@kepa.fi) Message-ID: <3DA2D9D0.6050908@kepa.fi> Date: Tue, 08 Oct 2002 16:12:48 +0300 From: Kim Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Puzzling NATD problem - revisited Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The setting: Network topology: Internet---Campus Network---(xl0)FreeBSD NATD machine(xl1)---Internal host A custom kernel build including the following options: options IPFIREWALL options IPDIVERT Used the command: sysctl net.inet.ip.forwarding=1 And started natd with natd -interface xl0 Then did, straight from the manpage, the following firewall rules: /sbin/ipfw -f flush /sbin/ipfw add divert natd all from any to any via xl0 /sbin/ipfw add pass all from any to any Now NAT works perfectly for the internal host, but (almost) all TCP connections cease to work to/from the NATD machine. AFAIK UDP and ICMP work perfectly. I've tried this on two different FreeBSD machines in the same network with identical results. If I remove the divert rule, everything works perfectly, except of course for the NAT. There have been no similar, puzzling effects on any Linux hosts I know of in the same network. Therefore I'm sure there's some knob I haven't pushed yet :) I'm aware this doesn't make much of a firewall but I'd like to get natd working before I run the firewall script. -- Kim Helenius kim.helenius@kepa.fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message