| Type: |
Code 
|
| Level: |
Beginner
|
| Date: |
2007-Apr-07
|
| Visited: |
8396 times
|
| Rating: |

|
| Published: |
Stephen Think |
|
|
This tutorial will show you how to configure your ProFTP server to accept Passive mode connections. Passive mode is mainly used when the client is behind a firewall or a router.
This is done by:
1) Start by finding the configuration file of your ftp server. Use the locate command.
locate proftpd.conf
We will assume that it was found in the default location.
2) Open this file with a text editor.
vi /etc/proftpd.conf
3) Put in the file this line PassivePorts 60000 65000.
I will recommend to put it right after the line which defines the default listening port, which is 21.
Now the FTP server is configured for passive mode support. We will have to configure the server firewall to accept connections on these ports as well.
4) Putting
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 60000:65000 -j ACCEPT
into your /etc/sysconfig/iptables file - the default firewall service
5) All that is left is to restart both applications so the new settings take effect
/etc/init.d/iptables restart
/etc/init.d/xinetd restart