I am having problems when connecting to a remote ftp server that is running on UNIX.When I try to coonect it freezes on the welcome screen and it dos=esnt prompt for password and username. Connected to 17.17.0.181.
220 Welcome to the Blabla FTP service

It just freezes there nothing, if I try to kill it with control c or z it wont die! I have to log on to another console and do the kill PID thingy. I know I am certain its something to do with firewall or routing because I can connect from else where.

My firewall iptables has the following settings
modprobe *ip_nat_ftp* ports21
modprobe *ip_conntrack_ftp*
iptables -A FORWARD -m state --state ESTABLISHED -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -m state --dport 21 --state NEW -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -m state --sport 20 --state RELATED -j ACCEPT
iptables -A FORWARD -p tcp -m tcp -m state --dport 1024:65535 --sport 1024:65535 --state RELATED -j ACCEPT
Anybody out there your help is much appreciated.

link|improve this question

45% accept rate
feedback

1 Answer

Is the firewall running on the same machine as the ftp daemon? If so, I think you need to use the INPUT chain, not the FORWARD chain. The FORWARD chain is used in packet forwarding. When the packets should be processed locally, they will go through the INPUT chain, not the FORWARD chain.

This "drawing" (from the netfilter website) explains which chains do what.

Incoming                 /     \         Outgoing
       -->[Routing ]--->|FORWARD|------->
          [Decision]     \_____/        ^
               |                        |
               v                       ____
              ___                     /    \
             /   \                  |OUTPUT|
            |INPUT|                  \____/
             \___/                      ^
               |                        |
                ----> Local Process ----
link|improve this answer
No its not the same machine, I have firewall and some servers inside, I am trying to do it from a server inside the firewall. – Rungano Aug 4 '09 at 10:35
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.