Hey, this is an updated tutorial to install CSF on your VPS.
I recommend beginners to use WinSCP for editing files.
1. First login into your VPS using your vps details, if you don't have the knowledge to login please stop reading this tutorial.
2. These are the commands to be executed to install CSF (officially from CS.)
3. Check if CSF is installed correctly by running:
"Don't worry if you cannot run all the features, so long as the script doesn't report any FATAL errors"
3. CSF should be installed now, if you got any FATAL errors you may be missing iptables modules, this can be enabled by your host.
4. Now let's start configuring CSF, edit the file: /etc/csf/csf.conf
And find the following line:
And add to the end ",30000:35000"
So it will look like:
(This is an example!)
Also if you changed your SSH port add it to the end of that line.
Now save the file and restart CSF by executing the following command:
5. Now we are going to configure FTP server, this is because CSF will block passive ports by default.
If you have PureFTP do this:
Edit the following file: /etc/pure-ftpd.conf
And find:
Remove the # or just add the line above.
Save the file and restart FTP server by executing:
If you have ProFTP do this:
Edit the following file: /etc/proftpd.conf
And find:
Remove the # or just add the line above.
Save the file and restart FTP server by executing:
Enjoy :D
I recommend beginners to use WinSCP for editing files.
1. First login into your VPS using your vps details, if you don't have the knowledge to login please stop reading this tutorial.
2. These are the commands to be executed to install CSF (officially from CS.)
Code:
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Code:
perl /etc/csf/csftest.pl
3. CSF should be installed now, if you got any FATAL errors you may be missing iptables modules, this can be enabled by your host.
4. Now let's start configuring CSF, edit the file: /etc/csf/csf.conf
And find the following line:
Code:
TCP_IN = ""
So it will look like:
Code:
TCP_IN = "20,21,22,2082,2083,2086,2087,30000:35000"
Also if you changed your SSH port add it to the end of that line.
Now save the file and restart CSF by executing the following command:
Code:
csf -s
If you have PureFTP do this:
Edit the following file: /etc/pure-ftpd.conf
And find:
Code:
# PassivePortRange 30000 35000
Save the file and restart FTP server by executing:
Code:
service pureftpd restart
Edit the following file: /etc/proftpd.conf
And find:
Code:
# PassivePorts 30000 35000
Save the file and restart FTP server by executing:
Code:
service proftpd restart
Enjoy :D