From owner-freebsd-questions Sun Aug 5 16:14:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pdxpo.dsl-only.net (sub16-3.member.dsl-only.net [63.105.16.3]) by hub.freebsd.org (Postfix) with ESMTP id 0D41337B403 for ; Sun, 5 Aug 2001 16:14:08 -0700 (PDT) (envelope-from pdxmax@dsl-only.net) Received: from 192.168.45.3 (unverified [63.105.29.28]) by pdxpo.dsl-only.net (Rockliffe SMTPRA 4.5.4) with ESMTP id for ; Sun, 5 Aug 2001 16:09:47 -0700 Date: Sun, 5 Aug 2001 16:10:33 -0700 From: Tabor Kelly X-Mailer: The Bat! (v1.53d) Personal Reply-To: Tabor Kelly X-Priority: 3 (Normal) Message-ID: <3416923460.20010805161033@dsl-only.net> To: freebsd-questions@freebsd.org Subject: natd redirect_port only works from the outside MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Okay. After much fuss I discovered that I was redirecting ports through natd, but from the outside only! Here is a diagram of my network: ------------------- | Private Network | ------------------- | 192.168.45.3 | | 192.168.45.9 | | 192.168.45.66 | ------------------- | --------------------- | Router | --------------------- | xl0: 63.105.29.28 | | xl1: 192.168.45.1 | --------------------- | --------------------- | ISP | --------------------- | GW: 63.105.29.1 | --------------------- Now, here is a copy of my /etc/natd.conf file (I wanted a separate file for all of the redirect_port lines I will have!). For you information I call natd: "natd -f /etc/natd.conf". interface xl0 use_sockets yes same_ports yes redirect_port tcp 192.168.45.66:8181 8181 redirect_port udp 192.168.45.66:8181 8181 redirect_port tcp 192.168.45.3:21 21 redirect_port udp 192.168.45.3:21 21 Now, these passthroughs work fine as long as I am coming from the outside (from the ISP). But if I am coming from my private network, they do not work. If I try # telnet 63.105.29.28 8181 i get # Could not Open a Connection to 63.105.29.28 if I type ifconfig I get the following: xl0: flags=8843 mtu 1500 inet 63.105.29.28 netmask 0xffffff00 broadcast 63.105.29.255 ether 00:01:02:61:30:2f media: autoselect (10baseT/UTP) status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP 100baseTX xl1: flags=8843 mtu 1500 inet 192.168.45.1 netmask 0xffffff00 broadcast 192.168.45.255 ether 00:01:02:6a:c6:5c media: autoselect (100baseTX ) status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP 100baseTX lp0: flags=8810 mtu 1500 gif0: flags=8010 mtu 1280 gif1: flags=8010 mtu 1280 gif2: flags=8010 mtu 1280 gif3: flags=8010 mtu 1280 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 Does anybody have any ideas? I am new to FreeBSD's networking. I only really have expierience with Linux 2.2. Just ask if you need any more config files. Thank You, Tabor Kelly To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message