thanks
how to issue CCC command?
Main Topics
Browse All TopicsHello Expert
We have recently switched from FTP to FTPS
Then our clients start to have problems, some of them get 425 can't open data connection
I realize most of them are behind a firewall and router as well.
Please see the log
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: giltjrPosted on 2009-08-31 at 19:51:53ID: 25228231
This is because when using FTPS the command/control session (tcp port 21 traffic) is encrypted and the firewall can't see it. Since the firewall can't see it, it can see the PORT/PASV commands and does not know what ports the data connection is trying to use. Since the firewall has no clue what data ports are being used it can't dynamically (and temporally) allow the connection to happen.
If both the client and server support it, you can have the client issue the CCC command before the put/get/ls commands. CCC is the "clear channel command" command. This causes the next command to be issued in the clear (that is not encrypted.
If your ftp client or server does not support the CCC command, then you need to make sure that:
If using active ftp then your firewall needs to allow outbound traffic with a source port of 20 and a destination port > 1023. The other side must allow inbound traffic with source port of 20 and destination port > 1023. If needed the firewalls can be setup just to allow the ports and direction for the specific IP addresses involved.
If using passive ftp, setup the ftp server to use a specific port range for the data connection (say like 10000-10049) and then your firewall needs to allow inbound traffic with a source port >1023 and a destination port range equal to to what you set your server to use for the data port. The other side must allow outbound traffic with source port >1023 and destination port range equal to what you set your server to use for the data ports.
Also it would be best if your server and client supported extended passive or extended active ftp. If they don't then you could still have problems. This is because the firewall can't change the IP address on the PORT or PASV commands and so the other side sees the servers real IP address, not the NAT'ed address (assuming you are doing NAT).