Image may be NSFW.
Clik here to view.
This assumes that you have an existing pure-ftp running already and is listening to the default port 21. This guide will not in any way alter your existing pure-ftp configuration as this will be a separate standalone process using a different configuration file. This guide was tested to work on CentOS Linux with Cpanel installed.
First, let us copy all the necessary files we need, make a copy of the existing pure-ftp configuration file.
cp -Rpf /etc/pure-ftpd.conf /etc/pure-ftpd-custom.conf
Open the copied configuration file, then look for the following line.
vi /etc/pure-ftpd-custom.conf
# Bind 127.0.0.1,21
Replace the above line to the one below without the # sign.
Bind [your ip address],[your custom port]
Don’t forget the comma after the ip address as it act as a separator between the address and the port.
Now, make a copy of the pure-ftp init script, open it and modify to reflect the changes.
cp -Rpf /etc/rc.d/init.d/pure-ftpd /etc/rc.d/init.d/pure-ftpdc
vi /etc/rc.d/init.d/pure-ftpdc
Look for line below and point it to the new configuration file.
default
$DAEMONIZE $fullpath /etc/pure-ftpd.conf -O clf:/var/log/xferlog $OPTIONS –daemonize
new entry
$DAEMONIZE $fullpath /etc/pure-ftpd-custom.conf -O clf:/var/log/xferlog $OPTIONS –daemonize
Now start the pure-ftp daemon and then try to establish connection to it.
/etc/rc.d/init.d/pure-ftpdc start
That’s about it, good luck.
Image may be NSFW.
Clik here to view.