Re: Reaching FTP on internal network behind NAT/router FreeBSD 4.7

2003-03-10 Thread James Long
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 :. So I figured to use port redirection 
> on my FreeBSD NAT/router.Which consists of 2 nic, rl0  and rl1 
> .
> 
> --
> /etc/rc.conf
> defaultrouter=
> firewall_type="open"
> natd_flags="-s -u -m redirect_port tcp :  redirect_port 
> udp : "
> --

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 : 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  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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Reaching FTP on internal network behind NAT/router FreeBSD 4.7

2003-03-10 Thread Sanne Taaij
I run FreeBSD 4.7

My goal is to connect from the internet to my FTP which is running on my 
internal network at :. So I figured to use port redirection 
on my FreeBSD NAT/router.Which consists of 2 nic, rl0  and rl1 
.

--
/etc/rc.conf
defaultrouter=
firewall_type="open"
natd_flags="-s -u -m redirect_port tcp :  redirect_port 
udp : "
--

Is this enough to let it work ?  I can't connect with an ftp client from one 
of the internal ip adresses to my public adress. The firewall is configured 
"open".

Should I add a rule like this:

---
/etc/rc.firewall
$fwcmd add pass tcp from any  to any 
$fwcmd add pass udp from any  to any 
---

to let it work? Maybe add a keep-state rule...?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message