ConfigServer Firewall (csf) and Login Failure Daemon (lfd) are designed to protect online servers by providing an adaptive firewall and access/process monitoring service. CSF in turn uses IPtables to actually implement the firewall rules. This module also includes Linux Malware Detect (maldet) for detecting malware.
Original Gist came from https://gist.github.com/2772865 and https://github.com/apocas/puppet-cpanel
2016-11-30
- Added support for Ubuntu 16.04 with systemd services
2015-02-18
- Added TCP_IN substitution of dynamically realised docommon::fireports
2015-01-21
- Latest version of csf.conf from version 7.58; fixed missing HTTPS perl deps
2014-12-30
- Made module compatible with Ubuntu 14.04
2014-12-23
- Added csf.fignore to handle misc files in /tmp folder
2014-12-17
- Tailored csf.pignore to ignore X server tasks under CentOS/GNOME
2014-10-17
- Made more PT_ options configurable to fine-tune volume of email notifications
2014-09-19
- Sharpened up csf.pignore list after CentOS changed some daemon names (e.g. haldaemon)
2014-05-14
- Added variables with sensible defaults for CONNLIMIT and PORTFLOOD directives to manage DOS attacks
2014-02-20
- Fixed minor order issue on configuration files csf_ignore and csf_pignore.conf
2014-02-12
- Making available as a module on Puppet Forge
2014-01-27
- Added vars to allow additions to csf.ignore and csf.pignore
2013-05-09
- Added 21 to default outgoing ports for yum updates
2013-04-11
- Added basic maldet configuration
Setup CSF firewall with defaults
class { 'docsf': }
Setup CSF firewall to allow in certain ports, alert to specific email and ignore scripted executables
class { 'docsf':
# allow web, ssh (on 15022), puppet, nrpe (on 5666)
tcp_in => "80,15022,8139,8140,5666",
lf_alert_to => '[email protected]',
csf_pignore => ['exe:/usr/bin/rsync', 'exe:/usr/bin/svn', 'exe:/usr/sbin/nrpe'],
}
Tested with CentOS 6, Ubuntu 12.04 LTS, Ubuntu 14.04 LTS
Copyright (C) 2012 Lightenna Ltd
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.