|
发表于 2004-4-14 04:09:40
|
显示全部楼层
changing the first rule to the following is much safer:
/sbin/iptables -A INPUT -p tcp --sport 20 --dport 1024: -j ACCEPT
Ftp protocol differs from many other protocols that it has two channels. The first channel is established when you connect to the server's port 21. In this channel you can issue the commands to the server. However, the server's response is not sent back to you through this channel. Instead, the server (from its port 20) then tries to connect back to your machine, this establishes the second channel (ftp-data). If the second channel is established successfully, the ftp server then sends the data back to you through it. |
|