I set up SFTP, but I have a problem regarding iptables. Here are my rules:
A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
By the way, I'm using the vsftpd
service for FTP. So, it's not connecting to FTP, before stopping iptables service. When I attempt to connect to FTP, that's gives me "Listing remote folder failed" error.
What should I do?