Install the CSF firewall in Ubuntu

Source: Internet
Author: User
1. Install LoginastherootusertoSSHandrunthefollowingcommands. rm-fvcsf.tgzwgethttp: // configure

1. Install
Login as the root user to SSH and run the following commands.
Rm-fv csf. tgz
Wget http://www.configserver.com/free/csf.tgz

Apt-get install libwww-perl
Tar-xzf csf. tgz
Cd csf
Sh install. sh

2. Prevent DDOS attacks
Step 1: Open the CSF configuration file/etc/csf. conf
Step 2: In that search for option called CT_LIMIT, by default it will be like CT_LIMIT = 0, change this to CT_LIMIT = 90, here 90 is the max no. of connections from an IP to your server (choose this value according to your server usage)

Step 3: Now search for option called CT_PORTS.This option is used to specify the port for which you want prevent DOS attack. since our aim is to prevent the DOS attck to apache-port 80, change CT_PORTS = "" to CT_PORTS = "80 ″

3. Limit the number of connections to each IP Address

CONNLIMIT = "80; 7"

4. PT_LIMIT = "0" when the program memory is insufficient, send an email

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.