Skip site navigation (1)Skip section navigation (2)
Date:      25 Jan 2001 11:11:13 -0500
From:      Lowell Gilbert <lowell@world.std.com>
To:        ertank@ozlerplastik.com (Ertan Kucukoglu), freebsd-questions@freebsd.org
Subject:   Re: Firewall and ftp
Message-ID:  <44wvbjsjby.fsf@lowellg.ne.mediaone.net>
In-Reply-To: ertank@ozlerplastik.com's message of "25 Jan 2001 14:58:33 %2B0100"
References:  <3A702FC5.48771E4@ozlerplastik.com>

next in thread | previous in thread | raw e-mail | index | archive | help
ertank@ozlerplastik.com (Ertan Kucukoglu) writes:

> I want to use ftp client and ftp server behind a firewall.
> 
> I tried to open ports 20 and 21 but, couldn't manage to use it. People can
> connect, give their passwords, but when they try to ls or get some file or
> something that my machine should send data to them it hangs there.
> 
> Which ports should be opened for proper ftp usage? 
> 
> I'm using ipfw, system is FreeBSD 4.2-STABLE. Internet NIC is called fxp1 on
> my machine. Also there is fxp0 for my LAN. ftp server is FreeBSD ftp server.

If both the server and client are behind separate firewalls, you won't
be able to use FTP between them unless the firewall has special code
to snoop on FTP control traffic and open ports for the data
connections dynamically.  I don't believe that ipfw or ipf do this.
An ftp proxy may help, but you would need to open holes for *that*
instead.  

Note that the FreeBSD ftp client will by default use ports in the
range 49152-65535.  You could open up that whole range, and FTP would
work, but, well, you'd've opened up a very big hole in your firewall.

If only the client is behind a firewall, then FTP should work fine if 
you use passive mode.  If only the server is behind a firewall, then
only active mode will work.  

Good luck.


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?44wvbjsjby.fsf>