ftp from linux to windows server timed out

Hello Experts,

I am new to Linux. On the Centos box(2.6.18) I need to ftp a log file to a windows server.
I tried the regular ftp command
ftp -i -n 192.168.5.10
user: mark
password: xxxx
it shows
230 User mark logged in.
Remote system type is Windows_NT

If I enter ls and it will only shows
227 Entering Passive Mode(192,168,5,10,230,21)
and then connection timed out.

That windows ftp server tested ok from a windows client to upload file.
The Linux ftp client also works if I connect to some public ftp site.

What setting should be set to make it work? Thanks a  lot
LVL 1
tomcattyyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Passive mode usually works with public sites. You may need to turn off passive mode in this case.
 ... Thinkpads_User
0
tomcattyyAuthor Commented:
Thanks
This internal ip is for testing only, eventually the ftp server and clients will be behind each one's firewalls.
Have to use passive mode.
0
JohnBusiness Consultant (Owner)Commented:
Try turning off for testing to see is this is the issue. I have one client site where passive mode does not work, and I just turned it off (WS_FTP) and connection and transfers now work fine. ... Thinkpads_User
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tomcattyyAuthor Commented:
Got your point, should I turn passive off in the client or from the server?
thanks.
0
JohnBusiness Consultant (Owner)Commented:
The server enforces port use and whether the client should use passive mode or not use it. So turn it off at the client (That is the way I have done it). ... Thinkpads_User
0
ClintSwineyCommented:
Passive mode has to be turned off on the FTP Server. If you want to use Passive mode you need to setup the firewalls to match the passive mode port range you specify on the FTP server. Just FYI, I have had lots of trouble making passive mode work 100% of the time.
0
tomcattyyAuthor Commented:

I just turn off the passive mode from the linux client side, and it does worked ! Thanks.
If Active mode is the choice, what port need to open on the client side? a lot of port?
0
JohnBusiness Consultant (Owner)Commented:
May I suggest you look at the following article which talks about the difference between active and passive FTP and also give port examples.  ... Thinkpads_User

http://slacksite.com/other/ftp.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ClintSwineyCommented:
Active FTP traditionally uses Port 21 and 22,20. Passive mode can use any range of unused ports in addition to 21 and 22,20.

Normally you just have to open port 21 for most FTP clients and firewall configs in active mode.
0
tomcattyyAuthor Commented:

I read that article before but not quite how many ports need to open though, for example ports from 1023 to 1050, is it enough or 1023 to 2000?  Suggestion?

Thanks
0
ClintSwineyCommented:
For passive mode you need at least 5 ports open, this will support 1-5 users at a time, the more ports the more users. I have tested it with 1,2,3 and 4 ports and 5 seems to be the magic number, anything less than 5 has problems. This led me to believe that increasing the range should be done in increments of 5, I have not tested this theory yet but it's a safe bet.
0
tomcattyyAuthor Commented:
OK, final solution is turn off the passive mode from linux client and opened the firewall 1023 to 1033, set up the ftp user permission for window ftp server.
Thanks all.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.