Setting up a FTP server

Any off topic discussions should go in this forum. Post count is not increased by posting here.
Archive Access status is required to post in this forum. Find out how to get it
Forum rules
Any off topic discussions should go in this forum. Post count is not increased by posting here.
Archive Access status is required to post in this forum. Find out how to get it
Post Reply
DeFacto

Setting up a FTP server

Post by DeFacto »

I decided to open my own FTP server and have followed this tutorial, but whenever I try to connect to it (trough FZ client) I get "Connection refused by the server"... What am I doing wrong?

EDIT: I get the above error when I try connecring from both the host computer and my laptop...

marceloantonio1
User avatar
Donator
Posts: 297
Joined: Thu Feb 24, 2011 1:51 pm
Location: /pt-BR

Re: Setting up a FTP server

Post by marceloantonio1 »

Maybe your ISP blocks incoming traffic for the FTP port...
Or it's just a problem with your configuration.
Try to set up the IIS FTP Server and try to connect.
14/07/2011: 0.13Mb/s DL; 0.01Mb/s UL; 939ms Ping; ISP: Empresa Brasileira de Telecomunicações S/A (Dial-up)
31/08/2015: 10.25Mb/s DL; 2.11Mb/s UL; 7ms Ping; ISP: NET Serviços de Comunicação S/A (Cable)

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

I'm using DynDNS service to update the adress with latest host IP...

marceloantonio1
User avatar
Donator
Posts: 297
Joined: Thu Feb 24, 2011 1:51 pm
Location: /pt-BR

Re: Setting up a FTP server

Post by marceloantonio1 »

I prefer No-IP...
Reconnect your internet, your IP will change and DynDNS will update the IP of the host. Try again to connect.
14/07/2011: 0.13Mb/s DL; 0.01Mb/s UL; 939ms Ping; ISP: Empresa Brasileira de Telecomunicações S/A (Dial-up)
31/08/2015: 10.25Mb/s DL; 2.11Mb/s UL; 7ms Ping; ISP: NET Serviços de Comunicação S/A (Cable)

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

I tried at least 10 times and I always get "Connection refused by the server" after 2 seconds... However, the IP displayed in FZ is correct, which means some of the settings must be wrong, but IDK which... :(

marceloantonio1
User avatar
Donator
Posts: 297
Joined: Thu Feb 24, 2011 1:51 pm
Location: /pt-BR

Re: Setting up a FTP server

Post by marceloantonio1 »

Your FileZilla server logs the connections?
And your FileZilla client details the error?
14/07/2011: 0.13Mb/s DL; 0.01Mb/s UL; 939ms Ping; ISP: Empresa Brasileira de Telecomunicações S/A (Dial-up)
31/08/2015: 10.25Mb/s DL; 2.11Mb/s UL; 7ms Ping; ISP: NET Serviços de Comunicação S/A (Cable)

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

To test the connection do the following steps:

0. If you don't have a router, you don't need to follow them, the server will be hyper-unsecured, but it will work without a hitch.
1. Use client to connect to 127.0.0.1, if it works continue to step 2.
1A. Check your FTP client, it's most likely turned off (yeah).
2. Open cmd --> ipconfig, look up your local IP on an active network card you use for Internet, connect to that IP. It it works, continue to step 3.
2A. Something is wrong with your firewall, router. In some cases (very rarely), the server doesn't allow LAN connections.
3. Go to "2ip.ru" website, see your IP? Connect to it, via the client. If it works, continue to step 4.
3A. Ports are forwarded incorrectly. In some cases (very rarely), your Internet Service Provider blocks IP forwarding on a certain port, try to use an another one then.
4. If you encouter (and you will) "cannot get directory listing" or "can't open data connection" during step 3, you should also forward a port for passive connection:
Image
And also go to the settings of the same server, set the same settings as on the pic below, and use the same port you have just forwarded (the second one):
Image
5. Reboot your router. Go to "2ip.ru", if you see a different IP, passive mode will fail even if you have forwarded ports. Nothing you should do, just wait some time, until IP relookups on the server.
6. Consider a DynDNS version 2, it works better. http://cdn.dyndns.com/dyndns-setup-win.zip
7. Enjoy.

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Works all the way up to step 3, where I get "ECONNREFUSED - Connection refused by the server" error. After that, I don't have a clue of what you're trying to tell me... :cry:

marceloantonio1
User avatar
Donator
Posts: 297
Joined: Thu Feb 24, 2011 1:51 pm
Location: /pt-BR

Re: Setting up a FTP server

Post by marceloantonio1 »

Before the "ECONNREFUSED - Connection refused by the server" error, it shows the last response of the server, what is it?
14/07/2011: 0.13Mb/s DL; 0.01Mb/s UL; 939ms Ping; ISP: Empresa Brasileira de Telecomunicações S/A (Dial-up)
31/08/2015: 10.25Mb/s DL; 2.11Mb/s UL; 7ms Ping; ISP: NET Serviços de Comunicação S/A (Cable)

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

DeFacto wrote:Works all the way up to step 3, where I get "ECONNREFUSED - Connection refused by the server" error. After that, I don't have a clue of what you're trying to tell me... :cry:
So? Use the guide:
3A. Ports are forwarded incorrectly. In some cases (very rarely), your Internet Service Provider blocks IP forwarding on a certain port, try to use an another one then.
You need to forward the ports. What is the model of your router?
Last edited by Pwned on Wed Aug 24, 2011 11:36 am, edited 1 time in total.

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Belkin F5D8233-4

EDIT: I tried to forward the port, but still get the Connection refused error...
Last edited by DeFacto on Wed Aug 24, 2011 11:52 am, edited 1 time in total.

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

DeFacto wrote:Belkin F5D8233-4
OK, do cmd --> ipconfig. In your active network card search for default gateway (you can also get your local IP address there). Enter that IP into the browser window. You see the router page. If you haven't changed the pass, it should be blank, according to Internet sources. Go to "Virtual Servers", set up ports as shown here. Pretty much the same as on my DD-WRT.

Image
Note to above: you should provide your local IP.

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

DeFacto wrote:I tried to forward the port, but still get the Connection refused error...
Then your firewall. I hope you use Windows Firewall, you will need to allow this app for packet exchange. By the way, can you enter IRC (#nttalk), that will be easier to assist you?

Image

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Tried both, default port (21) times out, the remapped one gives connection refused...

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

DeFacto wrote:Tried both, default port (21) times out, the remapped one gives connection refused...
Umm? I don't understand what do you mean. You should use the same ports for Inbound and Private in your Belkin settings.

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Right, sorry about that... :$ So they must both be 21, but what about Passive? Are they 21 too or some other number? And BTW I still can't connect...

halladayrules
User avatar
Posts: 18
Joined: Thu Jun 09, 2011 1:16 am

Re: Setting up a FTP server

Post by halladayrules »

Q. What ports do I need to open?

A. If you wish to set up a secure Filezilla Server you will need to forward TCP port 21, TCP port 990 (for implicit), as well as a passive port range such as TCP ports 3000-4000.

Implicit SSL listens on TCP port 990. Explicit SSL listens TCP port 21. But make sure if you plan to use explicit SSL that you can enabled the "Allow explicit FTP over TLS" option is selected in Filezilla Server Settings. Also ensure that you have created your self-signed SSL certificate as well.

Q. Is my ISP blocking the ports?

A. A good way to see if your ISP is blocking the ports is to use an open port checker tool.

Go here http://canyouseeme.org and simply type in port 21 and 990 and see if this online tool can see your port. If you see "Success: I can see your service on "xxx.xxx.xxx.xxx" on port (21)" it means that your ISP is not blocking the port.

However if the open port checking tool does not see port 21 it still doesn't mean your ISP is blocking the connection. In most cases it is always the firewall. In my case I needed to allow the Filezilla Server program as an inbound rule in the "Windows Firewall with Advanced Security" console. Simply click on inbound rules, right-click on it and choose New Rule. For the "type of rule" select Program then browse to the Filezilla Server executable. In my case its C:\Program Files (x86)\FileZilla Server\Filezilla server.exe". I just allowed it for all three profiles (domain, public, private). Using the open port checker tool again I retried port 21 and it was successful. This is of course assuming you use the default Windows Firewall. If you use a 3rd party firewall such as Comodo you might need to manually add Filezilla Server.exe as a trusted program as well as allow ports 21,990, [passive port range] as an inbound rule.

Here is my YouTube tutorial below if you are interested in watching it:

http://www.youtube.com/watch?v=-Ch2vMmaeds


Sorry I can't help you out 100% of the way because there are going to be some things that are platform specific (aka not everyone has the same model router, or same type of firewall software/hardware)
Image

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Thanks... :) Though it seems all ports are blocked... :?

marceloantonio1
User avatar
Donator
Posts: 297
Joined: Thu Feb 24, 2011 1:51 pm
Location: /pt-BR

Re: Setting up a FTP server

Post by marceloantonio1 »

Solved your problem?
14/07/2011: 0.13Mb/s DL; 0.01Mb/s UL; 939ms Ping; ISP: Empresa Brasileira de Telecomunicações S/A (Dial-up)
31/08/2015: 10.25Mb/s DL; 2.11Mb/s UL; 7ms Ping; ISP: NET Serviços de Comunicação S/A (Cable)

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Nope, not yet...

Yay, it works! :D Thanks man...

Pwned
Donator
Posts: 4268
Joined: Sat Aug 22, 2009 4:28 pm

Re: Setting up a FTP server

Post by Pwned »

Tell us how did you solve it, please. It would help others. :)

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

After following halladayrules' tutorial it still didn't work for a few minutes, but once my IP changed I tried again and it worked...

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

Sorry to bump, but since I'm re-opening the FTP, I'm still having issues; it connects fine, but when FileZilla Client gets to the MLSD command, it errors "Cannot get directory listing". Ports are fine. This happends on all computer at home, replacing the URL with LAN IP does nothing. Any ideas?

EDIT: Nevermind, fixed it by adding Filezilla Server and Filezilla Server interface to the exeptions under Windows Firewall. :)

chaoticjoy1
User avatar
Posts: 13
Joined: Sat Aug 04, 2012 4:19 am
Location: USA

Re: Setting up a FTP server

Post by chaoticjoy1 »

Make sure the ports are forwarded correctly. Just go through your router's settings and while doing so look at a tutorial on how to appropriately port forward your router.

EDIT: Oh sorry did not see your post, good job at figuring it out.
     
Without failure, there is no success.

DeFacto

Re: Setting up a FTP server

Post by DeFacto »

The dumb part is that even though Windows Firewall is suppose to inform you when it blocks something, in my case it didn't and did a silent-block of both Filezillas... :/

Post Reply