system

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IptablesAnalysis

type IptablesAnalysis struct {
	HasDocker          bool     // Docker chains detected
	DockerChains       []string // List of Docker chains found
	DockerUserRules    []string // Rules in DOCKER-USER chain
	UFWActive          bool     // Is UFW running
	DockerBypassingUFW bool     // Is Docker bypassing UFW
	RequiresSudo       bool     // Did we need sudo to read iptables
	ErrorMessage       string   // Error if analysis failed
}

IptablesAnalysis contains the results of iptables analysis

func AnalyzeIptables

func AnalyzeIptables() *IptablesAnalysis

AnalyzeIptables reads and analyzes iptables rules

func (*IptablesAnalysis) GetFirewallWarning

func (a *IptablesAnalysis) GetFirewallWarning() string

GetFirewallWarning returns a warning message if there are firewall issues

func (*IptablesAnalysis) GetRecommendation

func (a *IptablesAnalysis) GetRecommendation() string

GetRecommendation provides advice based on firewall analysis

type IptablesRule

type IptablesRule struct {
	Chain  string // e.g., "DOCKER", "DOCKER-USER", "INPUT"
	Rule   string // The full rule text
	Action string // e.g., "ACCEPT", "DROP", "REJECT"
}

IptablesRule represents a parsed iptables rule

Jump to

Keyboard shortcuts

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