Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Aug 2001 16:10:33 -0700
From:      Tabor Kelly <pdxmax@dsl-only.net>
To:        freebsd-questions@freebsd.org
Subject:   natd redirect_port only works from the outside
Message-ID:  <3416923460.20010805161033@dsl-only.net>

next in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex> 100baseTX 10baseT/UTP
<full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
xl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.45.1 netmask 0xffffff00 broadcast 192.168.45.255
        ether 00:01:02:6a:c6:5c
        media: autoselect (100baseTX <full-duplex>) status: active
        supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP
<full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3416923460.20010805161033>