Help us shape the future of Go! Take the 2026 Go Developer Survey

iptables

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CNIInputChain  = "AZURECNIINPUT"
	CNIOutputChain = "AZURECNIOUTPUT"
)

cni iptable chains

View Source
const (
	Input       = "INPUT"
	Output      = "OUTPUT"
	Forward     = "FORWARD"
	Prerouting  = "PREROUTING"
	Postrouting = "POSTROUTING"
)

standard iptable chains

View Source
const (
	Filter = "filter"
	Nat    = "nat"
	Mangle = "mangle"
)

Standard Table names

View Source
const (
	Accept     = "ACCEPT"
	Drop       = "DROP"
	Masquerade = "MASQUERADE"
)

target

View Source
const (
	Insert = "I"
	Append = "A"
	Delete = "D"
)

actions

View Source
const (
	Established = "ESTABLISHED"
	Related     = "RELATED"
)

states

View Source
const (
	V4 = "4"
	V6 = "6"
)

Variables

View Source
var (
	DisableIPTableLock bool
)

Functions

func AppendIptableRule added in v0.1.0

func AppendIptableRule(version, tableName, chainName, match, target string) error

Append iptable rule at end of iptable chain

func ChainExists added in v0.1.0

func ChainExists(version, tableName, chainName string) bool

check if iptable chain alreay exists

func CreateChain added in v0.1.0

func CreateChain(version, tableName, chainName string) error

create new iptable chain under specified table name

func DeleteIptableRule added in v0.1.0

func DeleteIptableRule(version, tableName, chainName, match, target string) error

Delete matched iptable rule

func InsertIptableRule added in v0.1.0

func InsertIptableRule(version, tableName, chainName, match, target string) error

Insert iptable rule at beginning of iptable chain

func RuleExists added in v0.1.0

func RuleExists(version, tableName, chainName, match, target string) bool

check if iptable rule alreay exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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