FTP - Client and FTP server behind firewalls

FTP - Client and FTP server behind firewalls

Post by Laetu » Fri, 18 Feb 2000 04:00:00



I posted this message about a week ago and was hoping someone might see
it this time.  I really have been reading the docs and the boards but
can't seem to find an answer.  Please note:  I am using PASV on the
client and I have installed and have running ip_masq_ftp.o on the Linux

-------------

OK, I SWEAR I've read the posts (over and over but still can't get this
to work).

I've got two machines A & B on my network, both running RH 6.1 Linux.

Machine A is a firewall running IPCHAINS (simply masquerading - no
other rules) and portforwarding (using IPMASQADM PORTFW) only ports 20,
21, 23, and 80 to Machine B (an FTP/Web server behind the firewall).

I was not sure if RH 6.1 included ip_masq_ftp automatically, so on
Machine A (the firewall), I issued a "modprobe ip_masq_ftp.o" command
and then used the /etc/rc.d/init.d/inet script that Redhat provides to
restart the inetd daemon.  I also tried "kill -HUP" and then the pid
for inetd to restart it.  I also issued the same commands on Machine B
(I'm not sure which machine needed it).

BTW, machine B has an internally masqu'd IP and a virtual IP on the
incoming NIC on the firewall that is being forwarded (you probably
gathered that from the paragraphs above).

On Machine B, the FTP entry in inetd.conf is "ftp    stream  tcp
nowait  root    /usr/sbin/tcpd  in.ftpd -l -a"

On Machine B, the FTP entries in services are

"ftp-data        20/tcp
ftp            21/tcp"

The problem.  1) If a client on the outside of my network is behind a
firewall, even if I tell the FTP client to use PASV mode, I can connect
to Machine B's FTP but not do an "ls" of any directory.

2) Even if a client on the outside of my network is NOT behind a
firewall, and I tell it to use PASV, the same problem occurs.  If I
don't tell it to use PASV, then it works fine (it can connect to
Machine B's FTP server).

So, client behind no firewall and no PASV set on the client, FTP
works.  Client behind a firewall and with/or without PASV set, FTP
doesn't work.

I'm at wits end at this point.  Any help would be appreciated.

-- Thanks, Randy

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

FTP - Client and FTP server behind firewalls

Post by Laetu » Fri, 18 Feb 2000 04:00:00


I posted this message about a week ago and was hoping someone might see
it this time.  I really have been reading the docs and the boards but
can't seem to find an answer.  Please note:  I am using PASV on the
client and I have installed and have running ip_masq_ftp.o on the Linux

-------------

OK, I SWEAR I've read the posts (over and over but still can't get this
to work).

I've got two machines A & B on my network, both running RH 6.1 Linux.

Machine A is a firewall running IPCHAINS (simply masquerading - no
other rules) and portforwarding (using IPMASQADM PORTFW) only ports 20,
21, 23, and 80 to Machine B (an FTP/Web server behind the firewall).

I was not sure if RH 6.1 included ip_masq_ftp automatically, so on
Machine A (the firewall), I issued a "modprobe ip_masq_ftp.o" command
and then used the /etc/rc.d/init.d/inet script that Redhat provides to
restart the inetd daemon.  I also tried "kill -HUP" and then the pid
for inetd to restart it.  I also issued the same commands on Machine B
(I'm not sure which machine needed it).

BTW, machine B has an internally masqu'd IP and a virtual IP on the
incoming NIC on the firewall that is being forwarded (you probably
gathered that from the paragraphs above).

On Machine B, the FTP entry in inetd.conf is "ftp    stream  tcp
nowait  root    /usr/sbin/tcpd  in.ftpd -l -a"

On Machine B, the FTP entries in services are

"ftp-data        20/tcp
ftp            21/tcp"

The problem.  1) If a client on the outside of my network is behind a
firewall, even if I tell the FTP client to use PASV mode, I can connect
to Machine B's FTP but not do an "ls" of any directory.

2) Even if a client on the outside of my network is NOT behind a
firewall, and I tell it to use PASV, the same problem occurs.  If I
don't tell it to use PASV, then it works fine (it can connect to
Machine B's FTP server).

So, client behind no firewall and no PASV set on the client, FTP
works.  Client behind a firewall and with/or without PASV set, FTP
doesn't work.

I'm at wits end at this point.  Any help would be appreciated.

-- Thanks, Randy

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. FTP server behind on firewall FTP client behind another

I have a Windows-based FTP server (G6) behind a linux firewall box
running ipchain and ipmasqadm portfw rules to enable communication
with the out side world. I can connect to this server from the
outside, but PASV doesn't work. I have rules that allow ports above
1023 for the PASV traffic and I also had put the FTP server on a
haigher port other than 21.  I portfw'd the same port through to the
internal Windows machine running the ftp server as well as forwarding
the ftp-data. I have the ip_masq_ftp module loaded. I'm not sure why
PASV doesn't work.

Also, the other thing I'm trying to get working is communicating with
this same FTP server from a client within another linux-firewalled
(also using ipchains and portfw rules) LAN. I can connect, but can't
get any data transfers going, including directory listings, using
either PASV or regular FTP. I'm not sure if I should be forwarding
ftp-data to the internal machine running the ftp client.

What I ultimately want to do is be able to connect from a client
within on linux firewalled LAN to an ftp server inside another linux
firewalled LAN on a non-standard port and using PASV if possible. Any
help would be appreciated.

2. Red Hat 6.0 and isapnp.conf

3. FTP server behind linux firewall communicating w/ FTP behind linux firewall

4. XDM something or other???

5. FTP client inside linux firewall communicating with FTP server inside another linux firewall

6. Help: (mail) content-length/type headers not set

7. FTP: Client and Server behind two different firewalls.

8. Using multi-host disksets with DiskSuite

9. FTP client behind secure firewall?

10. How to enable FTP clients behind iptables firewall

11. ftp client behind iptables firewall

12. problem with ftp client behind redhat 7.2 iptables firewall

13. Setting up an FTP server from behind an ISP's firewall