fedora core 3 linux ftp not working due to firewall

I have two linux servers.  One needs to ftp into another.  The firewall on both are set to all ftp.  Taking the firewall off the server and everything works.  Put the firewall on, and it works in active mode, but wont end a command such as put, it just stands there.  How do I get it to allow ftp to the server when the firewall on the server is up?
Thanks
Ian
RebelnorthAsked:
Who is Participating?
 
marxyCommented:
You need to modify config file of firewall /etc/sysconfig/iptables-config
Add (or modify) these lines
IPTABLES_MODULES="ip_nat_ftp ip_conntrack_ftp ipt_conntrack"

Run
/etc/init.d/iptables restart

Enjoy :-)
0
 
XoFCommented:
...but i do not have a /etc/sysconfig directory....what now? ;-))
SCNR....

Adding the connection tracking helper module for FTP is one thing, the other thing is, to reflect connection tracking / stateful inspection in your filter rules.
For example, to allow box A to ftp into box B, try this one:

on B:
modprobe ipt_conntrack ipt_conntrack_ftp
iptables -A INPUT -s A -p tcp --dport 20 -j ACCEPT
iptables -A INPUT -s A -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -s A -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -d A -m state --state ESTABLISHED,RELATED -j ACCEPT

cheers & HTH,

-XoF-



0
 
XoFCommented:
> ...but i do not have a /etc/sysconfig directory....what now? ;-))
> SCNR....

oops, too early in the morning...
haven't realized, that the OP clearly mentioned "Fedora Core 3" in the title....:(

Sorry!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.