Link to home
Start Free TrialLog in
Avatar of Rebelnorth
Rebelnorth

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of marxy
marxy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of XoF
XoF

...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-



> ...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!