rules

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPTablesAdapter added in v0.7.0

type IPTablesAdapter interface {
	Exists(table, chain string, rulespec IPTablesRule) (bool, error)
	Delete(table, chain string, rulespec IPTablesRule) error
	List(table, chain string) ([]string, error)
	NewChain(table, chain string) error
	ClearChain(table, chain string) error
	DeleteChain(table, chain string) error
	BulkInsert(table, chain string, pos int, rulespec ...IPTablesRule) error
	BulkAppend(table, chain string, rulespec ...IPTablesRule) error
}

type IPTablesRule added in v0.7.0

type IPTablesRule []string

func AppendComment added in v0.7.0

func AppendComment(rule IPTablesRule, comment string) IPTablesRule

func NewAcceptExistingLocalRule

func NewAcceptExistingLocalRule() IPTablesRule

func NewAcceptRule added in v0.22.0

func NewAcceptRule() IPTablesRule

func NewDefaultDenyLocalRule

func NewDefaultDenyLocalRule(localSubnet string) IPTablesRule

func NewDefaultEgressRule

func NewDefaultEgressRule(localSubnet, deviceName string) IPTablesRule

func NewIngressMarkRule added in v0.23.0

func NewIngressMarkRule(hostInterface string, hostPort int, hostIP, tag string) IPTablesRule

func NewInputAllowRule added in v0.19.0

func NewInputAllowRule(protocol, destination string, destPort int) IPTablesRule

func NewInputDefaultRejectRule added in v0.10.0

func NewInputDefaultRejectRule() IPTablesRule

func NewInputRelatedEstablishedRule added in v0.10.0

func NewInputRelatedEstablishedRule() IPTablesRule

func NewLogLocalRejectRule added in v0.10.0

func NewLogLocalRejectRule(localSubnet string) IPTablesRule

func NewLogRule

func NewLogRule(rule IPTablesRule, name string) IPTablesRule

func NewMarkAllowLogRule added in v1.2.0

func NewMarkAllowLogRule(destinationIP, protocol string, startPort, endPort int, tag string, destinationAppGUID string, acceptedUDPLogsPerSec int) IPTablesRule

func NewMarkAllowRule

func NewMarkAllowRule(destinationIP, protocol string, startPort, endPort int, tag string, sourceAppGUID, destinationAppGUID string) IPTablesRule

func NewMarkSetRule

func NewMarkSetRule(sourceIP, tag, appGUID string) IPTablesRule

func NewNetOutDefaultNonUDPLogRule added in v1.3.0

func NewNetOutDefaultNonUDPLogRule(prefix string) IPTablesRule

func NewNetOutDefaultRejectLogRule added in v0.19.0

func NewNetOutDefaultRejectLogRule(containerHandle string, deniedLogsPerSec int) IPTablesRule

func NewNetOutDefaultRejectRule

func NewNetOutDefaultRejectRule() IPTablesRule

func NewNetOutDefaultUDPLogRule added in v1.3.0

func NewNetOutDefaultUDPLogRule(prefix string, acceptedUDPLogsPerSec int) IPTablesRule

func NewNetOutICMPLogRule added in v0.20.0

func NewNetOutICMPLogRule(startIP, endIP string, icmpType, icmpCode int, chain string) IPTablesRule

func NewNetOutICMPRule added in v0.20.0

func NewNetOutICMPRule(startIP, endIP string, icmpType, icmpCode int) IPTablesRule

func NewNetOutLogRule added in v0.7.0

func NewNetOutLogRule(startIP, endIP, chain string) IPTablesRule

func NewNetOutRelatedEstablishedRule

func NewNetOutRelatedEstablishedRule() IPTablesRule

func NewNetOutRule

func NewNetOutRule(startIP, endIP string) IPTablesRule

func NewNetOutWithPortsLogRule added in v0.7.0

func NewNetOutWithPortsLogRule(startIP, endIP string, startPort, endPort int, protocol, chain string) IPTablesRule

func NewNetOutWithPortsRule

func NewNetOutWithPortsRule(startIP, endIP string, startPort, endPort int, protocol string) IPTablesRule

func NewOverlayAllowEgress added in v0.23.0

func NewOverlayAllowEgress(deviceName, containerIP string) IPTablesRule

func NewOverlayDefaultRejectLogRule added in v0.22.0

func NewOverlayDefaultRejectLogRule(containerHandle, containerIP string, deniedLogsPerSec int) IPTablesRule

func NewOverlayDefaultRejectRule added in v0.22.0

func NewOverlayDefaultRejectRule(containerIP string) IPTablesRule

func NewOverlayRelatedEstablishedRule added in v0.22.0

func NewOverlayRelatedEstablishedRule(containerIP string) IPTablesRule

func NewOverlayTagAcceptRule added in v0.23.0

func NewOverlayTagAcceptRule(containerIP, tag string) IPTablesRule

func NewPortForwardingRule added in v0.23.0

func NewPortForwardingRule(hostPort, containerPort int, hostIP, containerIP string) IPTablesRule

type LockedIPTables added in v0.7.0

type LockedIPTables struct {
	IPTables iptables
	Locker   locker
	Restorer restorer
}

func (*LockedIPTables) BulkAppend added in v0.7.0

func (l *LockedIPTables) BulkAppend(table, chain string, rulespec ...IPTablesRule) error

func (*LockedIPTables) BulkInsert added in v0.7.0

func (l *LockedIPTables) BulkInsert(table, chain string, pos int, rulespec ...IPTablesRule) error

func (*LockedIPTables) ClearChain added in v0.7.0

func (l *LockedIPTables) ClearChain(table, chain string) error

func (*LockedIPTables) Delete added in v0.7.0

func (l *LockedIPTables) Delete(table, chain string, rulespec IPTablesRule) error

func (*LockedIPTables) DeleteChain added in v0.7.0

func (l *LockedIPTables) DeleteChain(table, chain string) error

func (*LockedIPTables) Exists added in v0.7.0

func (l *LockedIPTables) Exists(table, chain string, rulespec IPTablesRule) (bool, error)

func (*LockedIPTables) List added in v0.7.0

func (l *LockedIPTables) List(table, chain string) ([]string, error)

func (*LockedIPTables) NewChain added in v0.7.0

func (l *LockedIPTables) NewChain(table, chain string) error

type Restorer added in v0.7.0

type Restorer struct{}

func (*Restorer) Restore added in v0.7.0

func (r *Restorer) Restore(input string) error

Jump to

Keyboard shortcuts

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