iptables

package
v1.20.8 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalTrafficDetector

type LocalTrafficDetector interface {
	// IsImplemented returns true if the implementation does something, false otherwise
	IsImplemented() bool

	// JumpIfLocal appends conditions to jump to a target chain if traffic detected to be
	// of local origin
	JumpIfLocal(args []string, toChain string) []string

	// JumpINotfLocal appends conditions to jump to a target chain if traffic detected not to be
	// of local origin
	JumpIfNotLocal(args []string, toChain string) []string
}

LocalTrafficDetector in a interface to take action (jump) based on whether traffic originated locally at the node or not

func NewDetectLocalByCIDR

func NewDetectLocalByCIDR(cidr string, ipt utiliptables.Interface) (LocalTrafficDetector, error)

NewDetectLocalByCIDR implements the LocalTrafficDetector interface using a CIDR. This can be used when a single CIDR range can be used to capture the notion of local traffic.

func NewNoOpLocalDetector

func NewNoOpLocalDetector() LocalTrafficDetector

NewNoOpLocalDetector is a no-op implementation of LocalTrafficDetector

Jump to

Keyboard shortcuts

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