ConfigServer Firewall (csf)

Linux specific questions/information are gathered here. The main thrust of topics are applied to Centos/RedHat(RH)/Debian/Ubuntu/Gentoo distributives

ConfigServer Firewall (csf)

Postby lik » Wed Dec 16, 2009 11:53 pm

ConfigServer Firewall
http://www.configserver.com/

A Stateful Packet Inspection (SPI) firewall, Login/Intrusion Detection and Security application for Linux servers.

This suite of scripts provides:

    Straight-forward SPI iptables firewall script
    Daemon process that checks for login authentication failures for:
    Courier imap, Dovecot, uw-imap, Kerio
    openSSH
    cPanel, WHM, Webmail (cPanel servers only)
    Pure-ftpd, vsftpd, Proftpd
    Password protected web pages (htpasswd)
    Mod_security failures (v1 and v2)
    Suhosin failures
    Exim SMTP AUTH
    Custom login failures with separate log file and regular expression matching
    POP3/IMAP login tracking to enforce logins per hour
    SSH login notification
    SU login notification
    Excessive connection blocking
    UI Integration for cPanel, DirectAdmin and Webmin
    Easy upgrade between versions from within cPanel/WHM, DirectAdmin or Webmin
    Easy upgrade between versions from shell
    Pre-configured to work on a cPanel server with all the standard cPanel ports open
    Pre-configured to work on a DirectAdmin server with all the standard DirectAdmin ports open
    Auto-configures the SSH port if it's non-standard on installation
    Block traffic on unused server IP addresses - helps reduce the risk to your server
    Alert when end-user scripts sending excessive emails per hour - for identifying spamming scripts
    Suspicious process reporting - reports potential exploits running on the server
    Excessive user processes reporting
    Excessive user process usage reporting and optional termination
    Suspicious file reporting - reports potential exploit files in /tmp and similar directories
    Directory and file watching - reports if a watched directory or a file changes
    Block traffic on the DShield Block List and the Spamhaus DROP List
    BOGON packet protection
    Pre-configured settings for Low, Medium or High firewall security (cPanel servers only)
    Works with multiple ethernet devices
    Server Security Check - Performs a basic security and settings check on the server (via cPanel/DirectAdmin/Webmin UI)
    Allow Dynamic DNS IP addresses - always allow your IP address even if it changes whenever you connect to the internet
    Alert sent if server load average remains high for a specified length of time
    mod_security log reporting (if installed)
    Email relay tracking - tracks all email sent through the server and issues alerts for excessive usage (cPanel servers only)
    IDS (Intrusion Detection System) - the last line of detection alerts you to changes to system and application binaries
    SYN Flood protection
    Ping of death protection
    Port Scan tracking and blocking
    Permanent and Temporary (with TTL) IP blocking
    Exploit checks
    Account modification tracking - sends alerts if an account entry is modified, e.g. if the password is changed or the login shell
    Shared syslog aware
    Messenger Service - Allows you to redirect connection requests from blocked IP addresses to preconfigured text and html pages to inform the visitor that they have been blocked in the firewall. This can be particularly useful for those with a large user base and help process support requests more efficiently
    Country Code blocking - Allows you to deny or allow access by ISO Country Code
    Port Flooding Detection - Per IP, per Port connection flooding detection and mitigation to help block DOS attacks
    DirectAdmin UI integration
    Updated Webmin UI integration
    WHM root access notification (cPanel servers only)
    New in v5: lfd Clustering - allows IP address blocks to be automatically propagated around a group of servers running lfd. It allows allows cluster-wide allows, removals and configuration changes
    New in v5: Quick start csf - deferred startup by lfd for servers with large block and/or allow lists
    New in v5: Distributed Login Failure Attack detection
    New in v5: Temporary IP allows (with TTL)
    New in v5: IPv6 Support with ip6tables
    New in v5: Integrated UI - no need for a separate Control Panel or Apache to use the csf configuration
    New in v5: Integrated support for cse within the Integrated UI
    New in v5: cPanel Reseller access to per reseller configurable options Unblock, Deny, Allow and Search IP address blocks
    New in v5: System Statistics - Basic graphs showing the performance of the server, e.g. Load Averages, CPU Usage, Memory Usage, etc
    ...lots more!

The reason we have developed this suite is that we have found over the years of providing server services that many of the tools available for the task are either over-complex, not user friendly, or simply aren't as effective as they could be.

Installation

###############################################################################
# Copyright 2006-2012, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################


Installation
============
Installation is quite straightforward:
Code: Select all
cd /root
rm -fv csf.tgz*
rm -rvf csf
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd /root/csf/
sh install.sh

Next, test whether you have the required iptables modules:
Code: Select all
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.

You should not run any other iptables firewall configuration script. For
example, if you previously used APF+BFD you can remove the combination (which
you will need to do if you have them installed otherwise they will conflict
horribly):

sh /etc/csf/remove_apf_bfd.sh

That's it. You can then configure csf and lfd by edit the files
directly in /etc/csf/*, or on cPanel servers use the WHM UI

csf installation for cPanel is preconfigured to work on a cPanel server with all
the standard cPanel ports open.


csf installation for DirectAdmin is preconfigured to work on a DirectAdmin
server with all the standard DirectAdmin ports open.

csf auto-configures your SSH port on installation where it's running on a non-
standard port.

csf auto-whitelists your connected IP address where possible on installation.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers have this disabled and you should check /etc/init.d/syslog and make
sure that any klogd lines are not commented out. If you change the file,
remember to restart syslog.

See the readme.txt file for more information.

Webmin Module Installation/Upgrade
==================================

To install or upgrade the csf webmin module:

Install csf as above
Install the csf webmin module in:
Webmin > Webmin Configuration > Webmin Modules >
From local file > /etc/csf/csfwebmin.tgz > Install Module


Uninstallation
==============
Removing csf and lfd is even more simple:

On cPanel servers:

cd /etc/csf
sh uninstall.sh

On DirectAdmin servers:

cd /etc/csf
sh uninstall.directadmin.sh

On generic linux servers:

cd /etc/csf
sh uninstall.generic.sh
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Return to Linux specific

 


  • Related topics
    Replies
    Views
    Last post