Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2003 15:31:10 -0800
From:      James Long <list@museum.rain.com>
To:        Sanne Taaij <s.e.j.taaij@st.hanze.nl>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Reaching FTP on internal network behind NAT/router FreeBSD 4.7
Message-ID:  <20030310153110.A52044@ns.museum.rain.com>
In-Reply-To: <3E698EB5@webmail.helo.hanze.nl>; from s.e.j.taaij@st.hanze.nl on Mon, Mar 10, 2003 at 11:42:11PM %2B0100
References:  <3E698EB5@webmail.helo.hanze.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 10, 2003 at 11:42:11PM +0100, Sanne Taaij wrote:
> 
> My goal is to connect from the internet to my FTP which is running on my 
> internal network at <internal ip>:6666. So I figured to use port redirection 
> on my FreeBSD NAT/router.Which consists of 2 nic, rl0 <public ip> and rl1 
> <internal ip>.
> 
> ------------------
> /etc/rc.conf
> defaultrouter=<public ip adress>
> firewall_type="open"
> natd_flags="-s -u -m redirect_port tcp <internal ip>:6666 6666 redirect_port 
> udp <internal ip>:6666 6666"
> ------------------

Please forgive the obvious, but do you also have 

natd_enable="YES"

to make the NAT daemon start?

> I can't connect with an ftp client from one 
> of the internal ip adresses to my public adress.

That will not work.  From the internal net, you will need to ftp to <internal 
ip>:6666 directly.  NAT processes only those packets which travel via the 
external interface of your NAT/firewall box.  To test the NAT and firewall 
rules, you will have to test from a machine outside your firewall.  If you 
have access to a dial-up account, that will suffice, or perhaps you can ssh 
to a shell account on another machine, and then try to ftp back to your
public IP.

I would suggest you test first from the internal LAN to ensure that you can 
ftp on port 6666 to the internal IP of your ftp server.  This will show
you whether the ftp server itself is working as you think it should.  Once 
you know the ftp works on the internal LAN, then you can test from a machine 
_outside the firewall_ to get the natd redirection happening.


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?20030310153110.A52044>