iptable

package
v2.3.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadIPTables

func ReadIPTables(table string) ([]string, error)

Types

type PortRule

type PortRule struct {
	IP   string
	Port uint64
}

func ParseIPTableRules

func ParseIPTableRules(rules []string) []PortRule

ParseIPTableRules takes a slice of iptables rules as input and returns a slice of PortRule containing the parsed destination IP and port from the rules. When a rule has no -d flag, IP is empty (meaning the rule applies to all addresses).

Jump to

Keyboard shortcuts

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