Documentation ¶
Index ¶
- type IPTablesAdapter
- type IPTablesRule
- func AppendComment(rule IPTablesRule, comment string) IPTablesRule
- func NewAcceptExistingLocalRule() IPTablesRule
- func NewAcceptRule() IPTablesRule
- func NewDefaultDenyLocalRule(localSubnet string) IPTablesRule
- func NewDefaultEgressRule(localSubnet, deviceName string) IPTablesRule
- func NewIngressMarkRule(hostInterface string, hostPort int, hostIP, tag string) IPTablesRule
- func NewInputAllowRule(protocol, destination string, destPort int) IPTablesRule
- func NewInputDefaultRejectRule() IPTablesRule
- func NewInputRelatedEstablishedRule() IPTablesRule
- func NewLogLocalRejectRule(localSubnet string) IPTablesRule
- func NewLogRule(rule IPTablesRule, name string) IPTablesRule
- func NewMarkAllowLogRule(destinationIP, protocol string, startPort, endPort int, tag string, ...) IPTablesRule
- func NewMarkAllowRule(destinationIP, protocol string, startPort, endPort int, tag string, ...) IPTablesRule
- func NewMarkSetRule(sourceIP, tag, appGUID string) IPTablesRule
- func NewNetOutDefaultNonUDPLogRule(prefix string) IPTablesRule
- func NewNetOutDefaultRejectLogRule(containerHandle string, deniedLogsPerSec int) IPTablesRule
- func NewNetOutDefaultRejectRule() IPTablesRule
- func NewNetOutDefaultUDPLogRule(prefix string, acceptedUDPLogsPerSec int) IPTablesRule
- func NewNetOutICMPLogRule(startIP, endIP string, icmpType, icmpCode int, chain string) IPTablesRule
- func NewNetOutICMPRule(startIP, endIP string, icmpType, icmpCode int) IPTablesRule
- func NewNetOutLogRule(startIP, endIP, chain string) IPTablesRule
- func NewNetOutRelatedEstablishedRule() IPTablesRule
- func NewNetOutRule(startIP, endIP string) IPTablesRule
- func NewNetOutWithPortsLogRule(startIP, endIP string, startPort, endPort int, protocol, chain string) IPTablesRule
- func NewNetOutWithPortsRule(startIP, endIP string, startPort, endPort int, protocol string) IPTablesRule
- func NewOverlayAllowEgress(deviceName, containerIP string) IPTablesRule
- func NewOverlayDefaultRejectLogRule(containerHandle, containerIP string, deniedLogsPerSec int) IPTablesRule
- func NewOverlayDefaultRejectRule(containerIP string) IPTablesRule
- func NewOverlayRelatedEstablishedRule(containerIP string) IPTablesRule
- func NewOverlayTagAcceptRule(containerIP, tag string) IPTablesRule
- func NewPortForwardingRule(hostPort, containerPort int, hostIP, containerIP string) IPTablesRule
- type LockedIPTables
- func (l *LockedIPTables) BulkAppend(table, chain string, rulespec ...IPTablesRule) error
- func (l *LockedIPTables) BulkInsert(table, chain string, pos int, rulespec ...IPTablesRule) error
- func (l *LockedIPTables) ClearChain(table, chain string) error
- func (l *LockedIPTables) Delete(table, chain string, rulespec IPTablesRule) error
- func (l *LockedIPTables) DeleteChain(table, chain string) error
- func (l *LockedIPTables) Exists(table, chain string, rulespec IPTablesRule) (bool, error)
- func (l *LockedIPTables) List(table, chain string) ([]string, error)
- func (l *LockedIPTables) NewChain(table, chain string) error
- type Restorer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPTablesAdapter ¶
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 ¶
type IPTablesRule []string
func AppendComment ¶
func AppendComment(rule IPTablesRule, comment string) IPTablesRule
func NewAcceptExistingLocalRule ¶
func NewAcceptExistingLocalRule() IPTablesRule
func NewAcceptRule ¶
func NewAcceptRule() IPTablesRule
func NewDefaultDenyLocalRule ¶
func NewDefaultDenyLocalRule(localSubnet string) IPTablesRule
func NewDefaultEgressRule ¶
func NewDefaultEgressRule(localSubnet, deviceName string) IPTablesRule
func NewIngressMarkRule ¶
func NewIngressMarkRule(hostInterface string, hostPort int, hostIP, tag string) IPTablesRule
func NewInputAllowRule ¶
func NewInputAllowRule(protocol, destination string, destPort int) IPTablesRule
func NewInputDefaultRejectRule ¶
func NewInputDefaultRejectRule() IPTablesRule
func NewInputRelatedEstablishedRule ¶
func NewInputRelatedEstablishedRule() IPTablesRule
func NewLogLocalRejectRule ¶
func NewLogLocalRejectRule(localSubnet string) IPTablesRule
func NewLogRule ¶
func NewLogRule(rule IPTablesRule, name string) IPTablesRule
func NewMarkAllowLogRule ¶
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 ¶
func NewNetOutDefaultNonUDPLogRule(prefix string) IPTablesRule
func NewNetOutDefaultRejectLogRule ¶
func NewNetOutDefaultRejectLogRule(containerHandle string, deniedLogsPerSec int) IPTablesRule
func NewNetOutDefaultRejectRule ¶
func NewNetOutDefaultRejectRule() IPTablesRule
func NewNetOutDefaultUDPLogRule ¶
func NewNetOutDefaultUDPLogRule(prefix string, acceptedUDPLogsPerSec int) IPTablesRule
func NewNetOutICMPLogRule ¶
func NewNetOutICMPLogRule(startIP, endIP string, icmpType, icmpCode int, chain string) IPTablesRule
func NewNetOutICMPRule ¶
func NewNetOutICMPRule(startIP, endIP string, icmpType, icmpCode int) IPTablesRule
func NewNetOutLogRule ¶
func NewNetOutLogRule(startIP, endIP, chain string) IPTablesRule
func NewNetOutRelatedEstablishedRule ¶
func NewNetOutRelatedEstablishedRule() IPTablesRule
func NewNetOutRule ¶
func NewNetOutRule(startIP, endIP string) IPTablesRule
func NewNetOutWithPortsLogRule ¶
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 ¶
func NewOverlayAllowEgress(deviceName, containerIP string) IPTablesRule
func NewOverlayDefaultRejectLogRule ¶
func NewOverlayDefaultRejectLogRule(containerHandle, containerIP string, deniedLogsPerSec int) IPTablesRule
func NewOverlayDefaultRejectRule ¶
func NewOverlayDefaultRejectRule(containerIP string) IPTablesRule
func NewOverlayRelatedEstablishedRule ¶
func NewOverlayRelatedEstablishedRule(containerIP string) IPTablesRule
func NewOverlayTagAcceptRule ¶
func NewOverlayTagAcceptRule(containerIP, tag string) IPTablesRule
func NewPortForwardingRule ¶
func NewPortForwardingRule(hostPort, containerPort int, hostIP, containerIP string) IPTablesRule
type LockedIPTables ¶
type LockedIPTables struct { IPTables iptables Locker locker Restorer restorer }
func (*LockedIPTables) BulkAppend ¶
func (l *LockedIPTables) BulkAppend(table, chain string, rulespec ...IPTablesRule) error
func (*LockedIPTables) BulkInsert ¶
func (l *LockedIPTables) BulkInsert(table, chain string, pos int, rulespec ...IPTablesRule) error
func (*LockedIPTables) ClearChain ¶
func (l *LockedIPTables) ClearChain(table, chain string) error
func (*LockedIPTables) Delete ¶
func (l *LockedIPTables) Delete(table, chain string, rulespec IPTablesRule) error
func (*LockedIPTables) DeleteChain ¶
func (l *LockedIPTables) DeleteChain(table, chain string) error
func (*LockedIPTables) Exists ¶
func (l *LockedIPTables) Exists(table, chain string, rulespec IPTablesRule) (bool, error)
func (*LockedIPTables) NewChain ¶
func (l *LockedIPTables) NewChain(table, chain string) error
Click to show internal directories.
Click to hide internal directories.