Rampart_Module

Class Rampart_Module Integrates into fail2ban. Provides short-term and long-term blocks
extends Module\Skeleton\Standard
Methods Summary
public
public
# is_banned( string $ip = NULL, string $jail = NULL )
Authenticated client IP or $ip is banned
public
# banned_services( string $ip = NULL )
Get services for which IP is banned
public
# get_reason( string $ip = NULL, string $jail = NULL )
Get reason for ban
protected
# checkInput( string $ip = NULL, string $jail = NULL )
Perform permission validation and IP transformation
public
# ban( string $ip , string $jail )
Disallow an IP address from service
public
# temp( string $ip = NULL, int $duration = 7200 )
Temporarily whitelist an IP
public
# whitelist( string $ip = NULL, string $mode = 'add' )
Whitelist IP acccess
public
# can_delegate( )
Account supports delegation abilities
public
# max_delegations( )
Get maximum number of delegated entries
public
# enabled( )
Rampart service enabled
public
# get_delegated_list( )
Return a list of delegated whitelist entries
public
# get_plist( string $list )
Get permanent list entries
public
# get_jail_entries( string $jail )
Get jail entries
public
# flush( string $jail = NULL )
Flush jails
public
# blacklist( string $ip , string $mode = 'add' )
Permanently block access
public
# get_jails( )
Get active jails
public
# unban( string $ip = NULL, string $jail = NULL )
Unban an IP address
public
# bans_since( int $begin , int $end = NULL, array $jails = NULL )
Get ban counts for each jail
protected
# chain2Jail( string $chain )
Convert an iptables rule into a fail2ban jail
protected
public
# _cron( Cronus $cron )
public
Methods inherited from Module\Skeleton\Standard
__construct(), setUserParameters(), autoloadModule(), __wakeup(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), _resetModule(), cleanUserParameters(), query()
Constants Summary
public string FAIL2BAN_IPT_PREFIX
# 'f2b-'
public string FAIL2BAN_DRIVER
# 'ipset'
public string FAIL2BAN_CACHE_KEY
# 'f2b'
public array PLIST_NAMES
# array ( 0 => 'whitelist', 1 => 'blacklist', 2 => 'whitelist6', 3 => 'blacklist6', )
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties Summary
protected $confMapping
# NULL
protected $exportedFunctions
# array ( '*' => 10, 'ban' => 8, 'blacklist' => 8, 'whitelist' => 8, 'get_plist' => 8, 'get_jail_entries' => 8, 'flush' => 8, 'get_delegated_list' => 2, 'can_delegate' => 2, 'max_delegations' => 2, 'temp' => 2, )
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id