JavaScript Required.
We're sorry, but Pega7 doesn't work without JavaScript enabled. Please enable and refresh.
<p>This guide will walk you through installing CSF on a VPS or Dedicated server.</p> <h2>Prepare the Server</h2> <p>After logging in via SSH (as root!), we need to download the CSF firewall itself; let's make a temporary directory called 'tmp'. Then move into it and download the latest version of CSF:</p> <p>mkdir tmp<br /> cd tmp<br /> wget http://configserver.com/free/csf.tgz</p> <p>Once CSF is downloaded, we will need to extract the archive containing it and move it into the directory it creates:</p> <p>tar xf csf.tgz<br /> cd csf</p> <p>We are now ready to install CSF.</p> <h2>Install CSF on a Server with cPanel</h2> <p>CSF includes integration with control panels such as cPanel. To install it for a cPanel based server, execute the install script that is meant for cPanel:</p> <p>./install.cpanel.sh</p> <h2>Install CSF on a Server without cPanel</h2> <p>If you do not have cPanel on your server and would still like to install CSF, you can certainly do so. Execute the following command:</p> <p>./install.sh</p> <h2>Configure CSF</h2> <p>Configuring your firewall is required for it to function correctly. Let's open the CSF configuration file:</p> <p>nano /etc/csf/csf.conf</p> <p>To turn the firewall on, inside the editor, navigate down until you see TESTING="1" and change it to TESTING="0".</p> <p>All blocks are commented inside (a comment is a line that starts with a #) for you to understand what each section does. To add an incoming TCP port to the allow list, we would edit this variable:</p> <p>TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096"</p> <p>To allow incoming MySQL connections, we would add 3306 to the list:</p> <p>TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,3306"</p> <p>Press the keys CTRL + X to exit the editor when you make the changes. Press Y when it asks you if you want to overwrite the file.</p> <h2>Additional Documentation</h2> <p>You can find more info on the subject on the official website here: <a data-mce-href="http://configserver.com/cp/csf.html" href="http://configserver.com/cp/csf.html" target="_blank">http://configserver.com/cp/csf.html</a>.</p>