Install + Configure CSF on VPS [Updated]

Status
Not open for further replies.

l0calh0st

Active Member
4,052
2010
713
0
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.)

Code:
rm -fv csf.tgz 
wget http://www.configserver.com/free/csf.tgz 
tar -xzf csf.tgz 
cd csf 
sh install.sh
3. Check if CSF is installed correctly by running:
Code:
perl /etc/csf/csftest.pl
"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:
Code:
TCP_IN = ""
And add to the end ",30000:35000"

So it will look like:
Code:
TCP_IN = "20,21,22,2082,2083,2086,2087,30000:35000"
(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:
Code:
csf -s
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:
Code:
# PassivePortRange    30000 35000
Remove the # or just add the line above.
Save the file and restart FTP server by executing:
Code:
service pureftpd restart
If you have ProFTP do this:
Edit the following file: /etc/proftpd.conf

And find:
Code:
# PassivePorts    30000 35000
Remove the # or just add the line above.
Save the file and restart FTP server by executing:
Code:
service proftpd restart

Enjoy :D
 
6 comments
Status
Not open for further replies.
Back
Top