1

I am using macbook pro os x 10.10.3. I am a developer and I use ftp on a regular basis. How ever I am new to mac os. It was working fine but suddenly ftp stop working for all ftp clients on my mac for any server, even for ftp://ftp.mozilla.org/. I use netbeans and use its most native java based client. I tried with firebug, filezille, firefox, chrome and mac os native finder's client. I tried with terminal as well the response is:

Tousifs-MBP:~ tousifosman$ ftp -v ftp://ftp.mozilla.org/

Trying 63.245.215.56...

Connected to ftp.mozilla.org.

421 Service not available, remote server has closed connection.

ftp: Can't connect or login to host `ftp.mozilla.org'

However I am able to connect to all the servers from my windows platform.

Tousif Osman
  • 257
  • 2
  • 12

2 Answers2

1

There is most likely a NAT-firewall between you and the servers showing the symptom. (NAT-firewalls hide a whole network behind a single IP-number).

See http://slacksite.com/other/ftp.html for a more detailed explanation.

1

i think you should see who is using the ftp port by using

lsof -n -i4TCP:$PORT | grep LISTEN

and then kill the service that is using that port if it is ftp it should be 21 if its sftp it should be 22

read more about listening ports on mac os here Who is listening on a given TCP port on Mac OS X?

hope that helps

Community
  • 1
  • 1
Nassim
  • 2,387
  • 2
  • 32
  • 35
  • I have tried Tousifs-MBP:~ tousifosman$ lsof -n i4TCP:$PORT | grep LISTEN lsof: status error on i4TCP:: No such file or directory lsof 4.87 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhlnNoOPRtUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information – Tousif Osman Jun 08 '15 at 15:17
  • sudo lsof -i -n -P | grep TCP gives me full list to used ports. But I don't see any resources blocking ftp – Tousif Osman Jun 08 '15 at 15:18
  • disable any firewall (hardware or software) and try to find where it blocks, if you can connect from other machines and only the mac machine can't, then maybe the ip of the mac has been blocked by some firewall/router – Nassim Jun 08 '15 at 15:24