iptables

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPTables

type IPTables interface {
	AppendUnique(table string, chain string, rulespec ...string) error
	ChainExists(table, chain string) (bool, error)
	ClearChain(table, chain string) error
	Delete(table string, chain string, rulespec ...string) error
	Exists(table string, chain string, rulespec ...string) (bool, error)
}

type IPTablesError

type IPTablesError interface {
	IsNotExist() bool
	Error() string
}

type IPTablesManager

type IPTablesManager struct {
	// contains filtered or unexported fields
}

func (*IPTablesManager) CreateIP4Chain

func (iptm *IPTablesManager) CreateIP4Chain(table, chain string)

func (*IPTablesManager) CreateIP6Chain

func (iptm *IPTablesManager) CreateIP6Chain(table, chain string)

func (*IPTablesManager) Init added in v0.25.0

func (iptm *IPTablesManager) Init(ctx context.Context, wg *sync.WaitGroup) error

func (*IPTablesManager) SetupAndEnsureForwardRules

func (iptm *IPTablesManager) SetupAndEnsureForwardRules(ctx context.Context, flannelIPv4Network ip.IP4Net, flannelIPv6Network ip.IP6Net, resyncPeriod int)

func (*IPTablesManager) SetupAndEnsureMasqRules

func (iptm *IPTablesManager) SetupAndEnsureMasqRules(ctx context.Context, flannelIPv4Net, prevSubnet, prevNetwork ip.IP4Net,
	flannelIPv6Net, prevIPv6Subnet, prevIPv6Network ip.IP6Net,
	currentlease *lease.Lease,
	resyncPeriod int) error

type IPTablesRestore

type IPTablesRestore interface {
	// ApplyWithoutFlush apply without flush chains
	ApplyWithoutFlush(rules IPTablesRestoreRules) error
}

IPTablesRestore wrapper for iptables-restore

func NewIPTablesRestoreWithProtocol

func NewIPTablesRestoreWithProtocol(protocol iptables.Protocol) (IPTablesRestore, error)

NewIPTablesRestoreWithProtocol build new IPTablesRestore for supplied proto

type IPTablesRestoreRuleSpec

type IPTablesRestoreRuleSpec []string

IPTablesRestoreRuleSpec represents one rule spec delimited by space

type IPTablesRestoreRules

type IPTablesRestoreRules map[string][]IPTablesRestoreRuleSpec

IPTablesRestoreRules represents iptables-restore table block

Jump to

Keyboard shortcuts

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