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

FTP Server behind 2 routers!

Options
  • 02-04-2007 11:47pm
    #1
    Closed Accounts Posts: 48


    Hi guys, i want to set up an ftp server, my setip is that i have a DSL router supplying the house with broadband and this is connected to a wireless router.

    I have been trying to get it to work but to no avail, my buddy reckons because of the double router setup that this will be a nightmare, i dont know?
    He mentioned something about configuring the routers to foward port address or some other such gibberish anyone doen this or something similar?

    Any help much apprecaited.

    Dopey.


Comments

  • Registered Users Posts: 640 ✭✭✭Wcool


    So is your computer with FTP server on the wireless router? I presume so.

    What you need to do is open port 20 and 21 on both routers.
    20 is for the data connection once you have established an FTP link, 21 is the usual FTP 'control' connection.

    Most routers come with a predefined 'rule' to do so.

    So go into your config screen of your routers and look for something like port forwarding and open 20 and 21. It might be necessary to give your FTP server always the same internal IP address (this is also setup in the router).

    Don't forget to open port 20 and 21 as well on your windows firewall, if you run windows. Easiest is to allow the ftp server to go through the firewall.

    Have a look in your FTP server documentation, often this problem is well documented.


  • Registered Users Posts: 1,656 ✭✭✭rogue-entity


    As ^ said, you need to open up the ports on your DSL and Wireless routers.
    Lets assume the following setup:
    x.x.x.x -> Your Public IP. This will change every day, or every time you power off and power on your DSL Router. Get a dynamic domain name from DynDNS which is supported by most routers, and you will always be able to access your FTP server from the net regardless of your Public IP.

    y.y.y.y - Your WiFi Routers IP Address.
    z.z.z.z - Your FTP Server's IP Address.

    On your DSL router, you will need to forward port 21 to y.y.y.y so incoming FTP connections are forwarded by your DSL modem, to your Wireless router.

    Your Wireless router automatically doles out IP's to your computers, including your FTP server, you will need to assign your FTP server a static IP address in the same range as your WiFi router's address. If your WiFi router is 192.168.1.1, then give your FTP server an IP in the range 192.168.1.2-254. And make sure your WiFi Router's DHCP server does not include this address in the same range, it probably has something like start range and end range, set the start range to 192.168.1.3 in this case, so that you wont have a position where your WiFi router gives out an IP that is already being used by your FTP server.

    Now, that done, on your WiFi router, forward port 21 to z.z.z.z, the IP of your FTP server. You can check connectivity by going to grc.com, and look for the Shields Up test, you can check for individual ports, check port 21, and it should report open, if it can connect to the FTP server.

    FTP normally uses 20 and 21, 21 for data, and 20 for commands (or something like that), but it also supports PASV (Passive) mode, which allows it to work happily with just port 21 open.


  • Closed Accounts Posts: 48 DopeyLocks


    cheers guys ill try that thanks for taking the time to respond

    Dopey


  • Registered Users Posts: 7,518 ✭✭✭matrim


    You will also have to setup the ftp server to only use a range of data ports and forward those also.

    One thing to note is that for PASV mode some ftp servers need to know the external ip address. Therefore if you have a dynamic external ip address you may have to have a way to change this automatically.

    I use vsftpd on fedora for my ftp server and had to setup a cron job to check the ip address every hour. If the ip has changed it changes the vsftpd conf file and restarts the service.

    What ftp server are you planning to use? And on what platform?


  • Registered Users Posts: 4,148 ✭✭✭_CreeD_


    Turn off DHCP on your wireless router, let the DSL hand out IP configuration and treat the wireless router as a switch/access point only (presuming your wireless router has multiple switch ports (cable) use one of these to connect to the internal port on your DSL router, do not use the WAN/Internet port). Set your wireless router's management IP to a an address in the same range as the DSL DHCP range and exclude it from that range, i.e. set your DSL router not to handout that address. It'll work fine and remove any IP configuration issues you have, then do as suggested in forwarding the ports but ONLY from the DSL router the FTP server, the wireless router is now out of the equation. Much simpler.


  • Advertisement
Advertisement