ebtables

package
v1.6.16 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Ebtable actions.
	Append = "-A"
	Delete = "-D"
	// Ebtable tables.
	Nat    = "nat"
	Broute = "broute"
	Filter = "filter"
	// Ebtable chains.
	PreRouting  = "PREROUTING"
	PostRouting = "POSTROUTING"
	Brouting    = "BROUTING"
	Forward     = "FORWARD"
	// Ebtable Protocols
	IPV4 = "IPv4"
	IPV6 = "IPv6"
	// Ebtable Targets
	Accept         = "ACCEPT"
	RedirectAccept = "redirect --redirect-target ACCEPT"
)

Variables

This section is empty.

Functions

func DropICMPv6Solicitation

func DropICMPv6Solicitation(interfaceName string, action string) error

Drop Icmpv6 discovery messages going out of interface

func EbTableRuleExists

func EbTableRuleExists(tableName, chainName, matchSet string) (bool, error)

EbTableRuleExists checks if eb rule exists in table and chain.

func GetEbtableRules

func GetEbtableRules(tableName, chainName string) ([]string, error)

GetEbtableRules gets EB rules for a table and chain.

func SetArpDropRuleForIpCidr

func SetArpDropRuleForIpCidr(ipCidr string, ifName string) error

func SetArpReply

func SetArpReply(ipAddress net.IP, macAddress net.HardwareAddr, action string) error

SetArpReply sets an ARP reply rule for the given target IP address and MAC address.

func SetBrouteAccept

func SetBrouteAccept(ipAddress, action string) error

SetBrouteAccept sets an EB rule.

func SetBrouteAcceptByCidr

func SetBrouteAcceptByCidr(ipNet *net.IPNet, protocol, action, target string) error

SetBrouteAcceptCidr - broute chain MAC redirect rule. Will change mac target address to bridge port that receives the frame.

func SetBrouteAcceptByInterface

func SetBrouteAcceptByInterface(ifName string, protocol, action, target string) error

func SetDnatForArpReplies

func SetDnatForArpReplies(interfaceName string, action string) error

SetDnatForArpReplies sets a MAC DNAT rule for ARP replies received on an interface.

func SetDnatForIPAddress

func SetDnatForIPAddress(interfaceName string, ipAddress net.IP, macAddress net.HardwareAddr, action string) error

SetDnatForIPAddress sets a MAC DNAT rule for an IP address.

func SetEbRule

func SetEbRule(table, action, chain, rule string) error

SetEbRule sets any given eb rule

func SetSnatForInterface

func SetSnatForInterface(interfaceName string, macAddress net.HardwareAddr, action string) error

SetSnatForInterface sets a MAC SNAT rule for an interface.

func SetVepaMode

func SetVepaMode(bridgeName string, downstreamIfNamePrefix string, upstreamMacAddress string, action string) error

SetVepaMode sets the VEPA mode for a bridge and its ports.

Types

This section is empty.

Jump to

Keyboard shortcuts

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