Documentation
¶
Index ¶
- func AddToPersistentOffenders(confPath, ip, reason string) error
- func CountRecentBans(logPath, ip string, period time.Duration) (int, error)
- func LogPersistentOffender(logPath, ip, jail string, banCount int) error
- func LogTempBan(logPath, ip, jail, reason string) error
- type BanEntry
- type Config
- type FilterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToPersistentOffenders ¶
AddToPersistentOffenders adds an IP to the persistent offenders config file
func CountRecentBans ¶
CountRecentBans counts how many times an IP was banned in the given period
func LogPersistentOffender ¶
LogPersistentOffender logs to persistent-offenders.log
func LogTempBan ¶
LogTempBan logs a temporary ban to the tracking file for escalation tracking This tracks temp bans to detect persistent offenders who should be escalated
Types ¶
type Config ¶
type Config struct {
GlobalThreshold int
GlobalPeriod time.Duration
GlobalAction string
Enabled bool
BanLog string
OffendersLog string
OffendersConf string
// Per-filter thresholds (v1.0: renamed from jail)
Filters map[string]*FilterConfig
}
Config holds persistent offender configuration
func LoadConfig ¶
LoadConfig loads persistent offender configuration from files Removed: fail2ban.conf references (v1.0 migration to Suricata) .local settings override defaults
func (*Config) GetFilterConfig ¶
func (c *Config) GetFilterConfig(filterName string) *FilterConfig
GetFilterConfig returns configuration for a specific filter (v1.0: renamed from GetJailConfig) If filter not found, returns global defaults