rules

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateEnabledList

func GenerateEnabledList() error

GenerateEnabledList creates enabled.list from effective config

func GetRuleStats

func GetRuleStats() (map[string]interface{}, error)

GetRuleStats returns statistics about enabled rules

func InitializeCustomRules

func InitializeCustomRules() error

InitializeCustomRules creates empty custom.rules if it doesn't exist

Types

type RulesDir

type RulesDir struct {
	BaseDir     string // /var/lib/suricata/rules
	EnabledList string // /etc/nftban/suricata/rules/enabled.list
	CustomRules string // /etc/nftban/suricata/rules/custom.rules
}

RulesDir contains paths to Suricata rules

func GetRulesPaths

func GetRulesPaths() (*RulesDir, error)

GetRulesPaths returns paths based on distro config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL