How Can We Help?
< All Topics
Print

Enhancing Security: A Guide to Setting Up a Firewall on Your VPS

A firewall is a network security device that monitors incoming and outgoing traffic and decides whether to allow or block specific traffic based on specific security rules.

a) Linux

firewall

1. First, enter the cd /usr/src/ command to find the usr/src directory, and then enter the wget https://download.configserver.com/csf.tgz command to download CSF.

2. Then, use the tar xzf csf.tgz command to decompress the downloaded CSF.

3. Then enter the cd csf command in the directory to run CSF, or enter the sh install.sh command to run CSF. If you get an error that Perl and libwww are not installed, you can install them using the yum install perl-libwww-perl command.

4. Finally, disable existing firewalls using the systemctl command and locate the CSF configuration file in /etc/csf/csf.conf.

b) Windows

1. First, open Windows Firewall with Advanced Security using the Windows Search tool.

2. Then, select the rule type you want to create or edit, like adding a rule for incoming connections, in the Inbound Rules tab.

3. After that, click on the “New Rule…” button, select the type of rule you want to create, and choose “Port” to manage connections on before clicking the Next button to continue.

4. Next, select the appropriate port type (TCP or UDP) and specify the exact port number. Confirm the settings and click Next to proceed.

5. Then, select the desired connection on the specified port and click the Next button to proceed. There are 3 options here:

  • Allow connections from any IP address, or only allow connections from specified IP addresses.
  • Allow IPsec- protected connections.
  • Block all incoming connections.

6. The profile tab allows you to set the time when a rule will take effect, using all available options, and then press “Next.”

7. After that, ensure your firewall rule is named and described accurately to make it clear, and then click Finish to create it, as this is the final step.

Note: To enable or disable a firewall rule, simply right-click on the rule and select Properties > General.

Table of Contents