?
Solved

ftp from linux to windows server timed out

Posted on 2010-04-05
12
Medium Priority
?
674 Views
Last Modified: 2013-12-15
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
0
Comment
Question by:tomcattyy
  • 5
  • 4
  • 3
12 Comments
 
LVL 101

Expert Comment

by:John Hurst
ID: 29828208
Passive mode usually works with public sites. You may need to turn off passive mode in this case.
 ... Thinkpads_User
0
 
LVL 1

Author Comment

by:tomcattyy
ID: 29831273
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
 
LVL 101

Expert Comment

by:John Hurst
ID: 29831590
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 1

Author Comment

by:tomcattyy
ID: 29831945
Got your point, should I turn passive off in the client or from the server?
thanks.
0
 
LVL 101

Expert Comment

by:John Hurst
ID: 29832697
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
 
LVL 7

Expert Comment

by:ClintSwiney
ID: 29832984
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
 
LVL 1

Author Comment

by:tomcattyy
ID: 29833775

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
 
LVL 101

Accepted Solution

by:
John Hurst earned 1000 total points
ID: 29834243
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
 
LVL 7

Expert Comment

by:ClintSwiney
ID: 29834643
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
 
LVL 1

Author Comment

by:tomcattyy
ID: 29834773

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
 
LVL 7

Assisted Solution

by:ClintSwiney
ClintSwiney earned 1000 total points
ID: 29835384
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
 
LVL 1

Author Comment

by:tomcattyy
ID: 29839932
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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question