Date: Fri, 30 Oct 1998 00:43:45 -0500 From: Drew Baxter <netmonger@genesis.ispace.com> To: Richard Smith <richard@jezebel.demon.co.uk> Cc: chat@FreeBSD.ORG Subject: Re: NAT Message-ID: <4.1.19981030004243.00a7f5e0@genesis.ispace.com> In-Reply-To: <36383336.EE1E2F78@jezebel.demon.co.uk> References: <4.1.19981028212645.00a66a50@genesis.ispace.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex> 100baseTX >> 10baseT/UTP <full-duplex> 10baseT/UTP >> fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex> 100baseTX >> 10baseT/UTP <full-duplex> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.1.19981030004243.00a7f5e0>