iptables

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainRamaPostRouting = "RAMA-POSTROUTING"
	ChainRamaForward     = "RAMA-FORWARD"
	ChainRamaPreRouting  = "RAMA-PREROUTING"
)
View Source
const (
	TableNAT    = "nat"
	TableFilter = "filter"
	TableMangle = "mangle"

	ChainPostRouting = "POSTROUTING"
	ChainPreRouting  = "PREROUTING"
	ChainForward     = "FORWARD"

	ChainHybridnetPostRouting = "HYBRIDNET-POSTROUTING"
	ChainHybridnetForward     = "HYBRIDNET-FORWARD"
	ChainHybridnetPreRouting  = "HYBRIDNET-PREROUTING"

	HybridnetOverlayNetSetName  = "HYBRIDNET-OVERLAY-NET"
	HybridnetAllIPSetName       = "HYBRIDNET-ALL"
	HybridnetNodeIPSetName      = "HYBRIDNET-NODE-IP"
	HybridnetLocalPodIPSetName  = "HYBRIDNET-LOCAL-POD-IP"
	HybridnetLocalBGPNetSetName = "HYBRIDNET-LOCAL-BGP-NET"

	PodToNodeBackTrafficMarkString = "0x20"
	PodToNodeBackTrafficMark       = 0x20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func CreateIPtablesManager

func CreateIPtablesManager(protocol Protocol) (*Manager, error)

func (*Manager) RecordLocalPodIP added in v0.4.0

func (mgr *Manager) RecordLocalPodIP(podIP net.IP)

func (*Manager) RecordNodeIP

func (mgr *Manager) RecordNodeIP(nodeIP net.IP)

func (*Manager) RecordRemoteNodeIP added in v0.3.0

func (mgr *Manager) RecordRemoteNodeIP(nodeIP net.IP)

func (*Manager) RecordRemoteSubnet added in v0.3.0

func (mgr *Manager) RecordRemoteSubnet(subnetCidr *net.IPNet, isOverlay bool)

func (*Manager) RecordSubnet

func (mgr *Manager) RecordSubnet(subnetCidr *net.IPNet, isOverlay, isLocalBGP bool)

func (*Manager) Reset

func (mgr *Manager) Reset()

func (*Manager) SetBgpIfName added in v0.4.0

func (mgr *Manager) SetBgpIfName(bgpIfName string)

func (*Manager) SetOverlayIfName

func (mgr *Manager) SetOverlayIfName(overlayIfName string)

func (*Manager) SyncRules

func (mgr *Manager) SyncRules() error

type Protocol

type Protocol byte

Protocol defines the ip protocol either ipv4 or ipv6

const (
	// ProtocolIpv4 represents ipv4 protocol in iptables
	ProtocolIpv4 Protocol = iota + 1
	// ProtocolIpv6 represents ipv6 protocol in iptables
	ProtocolIpv6
)

Jump to

Keyboard shortcuts

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