Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Having a bit of trouble setting up an FTP server....

Options
  • 18-04-2011 10:11pm
    #1
    Registered Users Posts: 1,746 ✭✭✭


    I'm sure this is going to sound trivial and dumb to a few of ye.....

    Anyways, I'm trying to set up an FTP server on a home machine and I'm having a bit of a mare. My equipment is as follows (in order of connection):

    UPC Broadband through a modem they supplied me at least 5 years ago
    Netgear VOIP router
    Linksys wireless router
    PC

    So this is what I've done.

    On the PC I have Filezilla server on port 54545

    Netgear VOIP Router
    external IP of 12.34.567.89 for example
    Internal IP of 192.168.61.1

    Wireless Router (connected directly to the router above)
    external IP of 192.168.61.2
    Internal IP of 192.168.1.1

    On the PC
    - Static IP of 192.168.1.51
    - Dynamic DNS
    - Bitdefender (switched off the firewall but made no difference)
    - Filezilla on port 54545

    On the VOIP router I have forwarded all 54545 traffic to IP address 192.168.61.2 using port forwarding.

    On the Wireless router I have forwarded all 54545 traffic to 192.168.1.51 (PC) using port forwarding.

    On the PC, Filezilla should be picking up on port 54545

    Not making a connection at all. One thing though. If I put my external IP address (12.34.567.89) into Firefox, I get an error with the message "The server at 12.34.567.89 is taking too long to respond". If I try to ping the external IP address from my laptop (inside the network), I get a reply no problem but if I try an external web ping (just-ping.com) all the packets are lost.

    So my first port of call (pun intended) I guess is to make sure that I'm getting to the external IP address. Any suggestions on how I can do this or could it be a case that UPC are blocking inbound FTP traffic?


Comments

  • Registered Users Posts: 3,564 ✭✭✭swampgas


    FTP is a weird protocol and doesn't like firewalls. have a look at this:

    http://wiki.filezilla-project.org/FAQ especially points 2-4.
    FileZilla Server FAQ

    1. I've just installed the server and after starting the interface, it asks for a server address.

    Despite administrating the server on the local machine, the interface can also be used to administrate remote servers. But you will most likely want to administrate your local server. In this case enter 127.0.0.1 as server address. For the server port, you have to enter the same port number you did specify during installation for the admin port. (default: 14147)

    2. I'm behind a firewall and nobody can connect to my server or transfer files / directory listings

    You have to configure your firewall to allow incoming connections on the ftp port (default: 21), as well as allowing outgoing connections from the server. In FTP Active Mode, FileZilla Server tries to use a port one less than the ftp port for outgoing connections. If that fails it tries to use a port one larger than the ftp port and after that it requests a port from windows. It may be best to allow all outgoing connections from the server. Further you have to allow a port range for incoming connections for passive mode transfers. You can specify this port range on the "passive mode settings" page in the settings dialog in the server interface. In most cases, a range like 5000-5100 is sufficient. With certain firewalls, it may be possible that FileZilla can't determine the external IP address. In this case you have to enter the IP address (or your host name) on the passive mode page in the settings dialog. In case you've a dynamic IP (most dial-up users), you can also choose to retrieve the ip address from a website.

    3. I'm behind a router and nobody can connect to my server or transfer files / directory listings

    You have to configure your router to forward the ftp port (default: 21) to the server machine. Further you have to forward a port range for passive mode transfers. You can specify this port range on the "passive mode settings" page in the settings dialog in the server interface. In most cases, a range like 5000-5100 is sufficient. Most likely, FileZilla can't determine the external IP address if behind a router. In this case you have to enter the IP address (or your host name) on the passive mode page in the settings dialog. In case you've a dynamic IP (most dial-up users), you can also choose to retrieve the ip address from a website.

    4. I'm behind a router and a firewall and nobody can connect to my server or transfer files / directory listings
    Just follow both steps 2 and 3 in this case.

    5. How can I enable anonymous logins?

    Just create an account with the name anonymous and make sure the password box isn't checked on that account.

    6. How can I test that my server can be reached from the internet?
    It's not possible to check the accessibility of the server by connecting from inside the local network (or even localhost) by entering the external IP in a client. Reason is that most firewalls and/or routers only forward ports for requests coming from outside the internal network. So you would have to connect to your server from an external machine. You can test the accessibility of your server using the free service from http://ftptest.net/.

    Point 6 tells you how to make a test connection.


  • Closed Accounts Posts: 16 musically challenged


    why not use babyftp, no settings, no security, runs in PASV mode for firewalls, uses default ftp ports - good for testing


  • Registered Users Posts: 8,173 ✭✭✭Wompa1


    Hey OP, Wondering if you got this resolved. I'm having issues with mine and I'm wondering if there's something UPC is doing to block it.


  • Closed Accounts Posts: 3,362 ✭✭✭rolion


    Wompa1 wrote: »
    Hey OP, Wondering if you got this resolved. I'm having issues with mine and I'm wondering if there's something UPC is doing to block it.

    On top of what OP did already as above,have you tried:
    telnet 127.0.0.1 XX

    where:

    telnet ran in Command Prompt mode
    127.0.0.1 OR local IP address of the PC acting as a server
    XX -> port that is listening to FTP requests


  • Registered Users Posts: 1,536 ✭✭✭Pataman


    I think you need to forward port 21 on the router to the PC


  • Advertisement
  • Closed Accounts Posts: 3,362 ✭✭✭rolion


    Pataman wrote: »
    I think you need to forward port 21 on the router to the PC

    Why port 21 !?


  • Registered Users Posts: 3,564 ✭✭✭swampgas


    Getting FTP to work when both the server and client are behind firewalls is tricky if you are not that familiar with networking.

    You must have the server in PASV mode. Incoming connections to the FTP server (usually port 21, but 54545 in your case) need to be forwarded to the server. The server will then ask the client to make another connection, from a custom range of specified PASV ports. All of these PASV ports also need to be forwarded to the FTP server, "straight through" - no port number modification.

    Example:

    Filezilla server listens on port 54545.
    Filezilla server has custom port range of 55500 - 55599 specified for PASV.
    Filezilla server has your external router IP address as "external server IP".

    Now for your firewall:
    Port 54545 is forwarded to port 54545 on the Filezilla server
    Ports 55500 - 55599 are forwarded to the Filezilla server.

    Now, when an FTP client connects on port 54545, the Filezilla server will tell the client to make a new data connection to <external IP address> on a port from <custom port range>, everything should get forwarded properly by the firewall.

    See:
    Also - are you sure your FTP client is using port 54545 as well, or is it using the default of 21? You can try with ftp://username@12.34.56.78:54545 , for example.


    Have you considered using something like SFTP instead? That way you are getting a secure connection, and you only have to worry about a single port, usually port 22. Also, you can test with ssh, if ssh works to the target server, sftp should work as well.

    There is a list of sftp server software here if you want to go down that route.

    http://en.wikipedia.org/wiki/List_of_SFTP_server_software


Advertisement