这是它网业上说的步骤!!我有做错还是漏做什么吗 达人帮看看吓
There are two different modes of communication used by ftp, active and passive mode. Active mode is pretty simple to forward but passive mode needs a bit more work to forward. Passive mode is usually used by users behind a firewall and also by most webbrowsers.
To forward active mode traffic to an internal ftp server you need to:
Open the web interface to IPCop.
Select the Services/External Service Access menu item.
Add an entry for:
TCP
Add an address* or blank for access from any address
Port 21
Check the Enabled box
Press the SAVE button.
Then select "Port Forwarding"
Add an entry for:
TCP, Source Port=21, IP address of your ftp server, Destination Port=21
Ensure the Enabled box is checked
Press the ADD button.
You should now have a working forwarding of active ftp to your internal ftp server. Now lets add configuration for passive ftp.
Passive ftp uses high ports for the data communication of ftp, if you don't want to add heaps of ports to your port forward configuration you will have to configure your ftp-server to use some specified ports, in proftpd this is done by adding a "PassivePorts" directive in your configuration, in wuftpd you use the "passive ports" configuration in the ftpaccess, etc.
Now that you have limited the passive ports you need to forward them to your internal ftp-server
To forward your passive ports to your internal ftp server:
Open the web interface to IPCop.
Select "Port Forwarding"
Add an entry for:
TCP, Source Port="your passive port", IP address of your ftp server, Destination Port="your passive port"
Ensure the Enabled box is checked
Press the ADD button.
Do this for all the ports you have configured your ftp-server to use in passive mode.
Now we have to fix a feature (present at least in version 0.1.1) in IPCop masqerading. Open a shell on your IPCop machine with ssh or on the console. Use vi to edit the file /etc/rc.d/rc.network and change the line:
"modprobe ip_masq_ftp ports=21,2121"
to:
"modprobe ip_masq_ftp in_ports=21"
Now restart your ftp-server and your IPCop computer to enable your changes and ftp should work both in active and passive mode. |