Home Back to Tutorial Online Help

How to set up UPnP when Xlight FTP Server is behind a broadband router?


If your FTP Server is behind a broadband router, the simplest way to set up an FTP Server is through UPnP. Starting from Xlight FTP Server version 2.6, UPnP is supported and it is available for the personal edition.

Go to [Global Options]->[General]->[Firewall and broadband Router], and click the [setup...] button. In the dialog box, select the option "Auto-configure WAN IP and port forwarding" as shown in the figure below:


You can click the [Test...] button to test if your broadband router supports UPnP. Some broadband routers support UPnP by their default settings, but some don't. You may need to change the router's settings to enable UPnP. If the test is successful, then the UPnP is supported in your broadband router.


When UPnP is enabled, the Xlight FTP Server will open ports 61010 and 61011 automatically through UPnP in your router. These two ports are used for FTP passive mode. If you want to use another port range for the PASV command, you can choose the port range manually under the "Configure port range for passive mode". For UPnP, a maximum of 5 ports is allowed for the PASV port range. If you want to open more passive port ranges, you have to set up port forwarding manually in the router. Xlight FTP Server will automatically open FTP ports for virtual servers in the router through UPnP.

When the FTP Server is behind a broadband router, UPnP is a fast way to set it up. But be aware of its limitations. UPnP can have compatibility problems, and the UPnP implementation in the broadband router may be buggy. Xlight FTP Server may not be work compatible with some broadband routers. For many broadband routers, ports opened by UPnP will lost if they reboot. So if your broadband router reboots after the Xlight FTP Server is started, you may need to restart the Xlight FTP Server. If you want ports to be opened permanently in the broadband router, you will need to set up port forwarding manually. Because UPnP is a security issue for enterprises, high-end routers and firewalls used in the enterprise environment will never have UPnP support. Try to use UPnP behind those devices will always fail.

If UPnP doesn't work for you, or you want ports in the router to be opened permanently, you may need to set up port forwarding manually. You can click here for detailed information about how to set up port forwarding.