From owner-freebsd-chat Thu Oct 29 01:18:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA25905 for freebsd-chat-outgoing; Thu, 29 Oct 1998 01:18:45 -0800 (PST) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from ns.wan (trltech.demon.co.uk [194.222.7.191]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA25898 for ; Thu, 29 Oct 1998 01:18:39 -0800 (PST) (envelope-from richard@jezebel.demon.co.uk) Received: from jezebel.demon.co.uk (rdls.dhcp.sw.wan [192.9.201.75]) by ns.wan (8.8.8/8.8.8) with ESMTP id JAA04703; Thu, 29 Oct 1998 09:18:32 GMT (envelope-from richard@jezebel.demon.co.uk) Message-ID: <36383336.EE1E2F78@jezebel.demon.co.uk> Date: Thu, 29 Oct 1998 09:19:50 +0000 From: Richard Smith Organization: http://www.trltech.co.uk X-Mailer: Mozilla 4.05 [en] (WinNT; I) MIME-Version: 1.0 To: Drew Baxter CC: chat@FreeBSD.ORG Subject: Re: NAT References: <4.1.19981028212645.00a66a50@genesis.ispace.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Drew Baxter wrote: > > I've got a NAT Question, hoping someone's used it enough to be able to help > me out.. I'm no expert, but I *do* have a NAT that works ;-) > Nat doesn't work. Here's my config stuff. > > /etc/rc.ipfw contains this to run Nat: > natd -s -n fxp1 -l -m > IPfw show is: > 04000 152 21539 allow udp from any to any > 05000 0 0 allow icmp from 209.63.182.0/24 to 209.63.182.0/24 > 05500 503 35414 allow tcp from any to any > 05750 0 0 allow udp from any to any > 06000 0 0 divert 8668 ip from 192.168.0.0/24 to any out xmit fxp1 > 06500 0 0 divert 8668 ip from any to 192.168.0.0/24 in recv fxp1 > 65000 0 0 allow ip from any to any > 65535 4 264 deny ip from any to any My guess is that the divert never happens because it is numbered above all the allows. A matching 'allow' rule terminates rule processing for that packet. My divert rule is the lowest numbered rule and is a pretty standard... $fwcmd add divert natd all from any to any via ${fw_oif} HTH HAND richard. > ifconfig -a shows: > fxp0: flags=8843 mtu 1500 > inet 209.63.182.99 netmask 0xffffff00 broadcast 209.63.182.255 > ether 00:a0:c9:af:8c:90 > media: autoselect > supported media: autoselect 100baseTX 100baseTX > 10baseT/UTP 10baseT/UTP > fxp1: flags=8843 mtu 1500 > inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 > ether 00:a0:c9:b4:e1:04 > media: autoselect > supported media: autoselect 100baseTX 100baseTX > 10baseT/UTP 10baseT/UTP > -------- > > Soo.. what am I doing wrong? I do a ping to 192.168.0.5 and it's > 1.something ms, so that works fine.. I have gateway running, and divert is > enabled in the kernel.. > > --- > Drew "Droobie" Baxter > Network Admin/Professional Computer Nerd(TM) > OneEX: The OneNetwork Exchange 207-942-0275 > http://www.droo.orland.me.us > My Latest Kernel: FreeBSD 3.0-CURRENT (ONEEX) #14: Mon Oct 19 22:36:58 EDT 1998 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-chat" in the body of the message -- _______________________________________________________________________ Richard Smith Assistant Chief Engineer TRL Technology Limited To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message