netfilter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Filter   = Table("filter")
	Nat      = Table("nat")
	Mangle   = Table("mangle")
	Raw      = Table("raw")
	Security = Table("security")

	Prerouting = Chain("PREROUTING")
	Input      = Chain("INPUT")
	Forward    = Chain("FORWARD")
	Output     = Chain("OUTPUT")

	Invalid     = State("INVALID")
	Established = State("ESTABLISHED")
	New         = State("NEW")
	Related     = State("RELATED")
	Untracked   = State("UNTRACKED")

	TCP  = Protocol("tcp")
	UDP  = Protocol("udp")
	ICMP = Protocol("icmp")

	Drop     = Target("DROP")
	Accept   = Target("ACCEPT")
	Queue    = Target("QUEUE")
	NoQueue  = Target("NFQUEUE")
	Reject   = Target("REJECT")
	Redirect = Target("REDIRECT")

	EchoRequest = ICMPType("echo-request")
	EchoReply   = ICMPType("echo-reply")
)

Variables

This section is empty.

Functions

func Flush

func Flush(ctx context.Context, chain string) tether.UtilityFn

func Policy

func Policy(ctx context.Context, chain Chain, target Target) tether.UtilityFn

func Return

func Return(ctx context.Context, chain string) tether.UtilityFn

Types

type Chain

type Chain string

type ICMPType

type ICMPType string

type Protocol

type Protocol string

type Rule

type Rule struct {
	Table
	Chain
	States []State
	ICMPType

	Protocol
	Target

	Interface       string
	SourceAddresses []string
	FromPort        string
	SrcPort         string
	ToPort          string
}

func (*Rule) Commit

func (r *Rule) Commit(ctx context.Context) tether.UtilityFn

type State

type State string

type Table

type Table string

type Target

type Target string

Jump to

Keyboard shortcuts

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