Now you need to edit the proftpd configuration file using the following command
sudo vi /etc/proftpd.conf
at the end of the file add the following lines
PassivePorts 60000 60100
The PassivePorts command we entered there allows 100 concurrent connection which should be enough for most home users. Those are the ports we are going to have to forward to the FTP server on the router. Replace the xxx.xxx.xxx.xxx with the routers public IP address
Restart the proftpd server using the following comamnd
sudo /etc/init.d/proftpd restart
Now we have to forward the PassivePorts on the router. Login to your router click on the advanced tab then the forwarding tab. Enter in the port range we specified in the configuration file then check the TCP box UDP does not need to be enabled then enter the IP address of the FTP server and click enable. Click the "Apply button and your done on the router. Note if you are using a different brand router the process should be similar this is the setup on a Linksys router.
This should work your FTP server should work behind your NAT router. There is one drawback to this if you have a dynamic IP address from your ISP you will need to update the address in your configuration file whenever it changes.
Incoming search terms:
- proftpd nat
- ftp behind nat
- proftpd behind NAT
- proftpd NAT 防火墙 隧道
- Use custom PASV settings if you are operating the server from behind a NAT router or a firewall In
- Use custom PASV settings if you are operating the server from behind a NAT router or a firewall In that case