From owner-freebsd-chat Thu Oct 29 21:53:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA02570 for freebsd-chat-outgoing; Thu, 29 Oct 1998 21:53:38 -0800 (PST) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from Loki.orland.u91.k12.me.us (Loki.orland.u91.k12.me.us [169.244.111.67]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA02565 for ; Thu, 29 Oct 1998 21:53:36 -0800 (PST) (envelope-from netmonger@genesis.ispace.com) Received: from Celeris (56k-port4014.ime.net [209.90.195.24]) by Loki.orland.u91.k12.me.us (8.9.1/8.8.8-Loki) with SMTP id AAA04977; Fri, 30 Oct 1998 00:53:37 -0500 (EST) (envelope-from netmonger@genesis.ispace.com) X-Server-ID: Loki.orland.u91.k12.me.us, OCSNet - Orland Maine USA X-Coord-Name: Drew "Droobie" Baxter, OneNetwork Exchange X-Coord-Addr: Droobie@Openlink.orland.me.us X-Coord-Pager: USA: 207-471-2719, http://pagedroo.orland.me.us Message-Id: <4.1.19981030004243.00a7f5e0@genesis.ispace.com> X-Sender: netmonger@genesis.ispace.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Fri, 30 Oct 1998 00:43:45 -0500 To: Richard Smith From: Drew Baxter Subject: Re: NAT Cc: chat@FreeBSD.ORG In-Reply-To: <36383336.EE1E2F78@jezebel.demon.co.uk> References: <4.1.19981028212645.00a66a50@genesis.ispace.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 09:19 AM 10/29/98 +0000, Richard Smith wrote: >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 >> Ok that fixed that problem. My problem wasn't in routing at all, I just thought it was broken because I have a TCP issue. If I have the divert natd remark in my ipfw, I can't telnet into the box. But it does answer to pings, etc. Sooo how do I fix it so that my machine will take in telnets and things like that still? --- 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