iptables

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 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

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

Append iptable rule at end of iptable chain

func ChainExists

func ChainExists(version, tableName, chainName string) bool

check if iptable chain alreay exists

func CreateChain

func CreateChain(version, tableName, chainName string) error

create new iptable chain under specified table name

func DeleteIptableRule

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

Delete matched iptable rule

func InsertIptableRule

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

Insert iptable rule at beginning of iptable chain

func RuleExists

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