iptablescontroller

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NatPreroutingLoadBalanceChain iptables.ChainName = "prerouting_loadbalancing"

	// ToDo: make filter based on interface
	// filterForwardFromLanChain iptables.ChainName = "forward_lan_to_wan"
	// filterForwardFromWanChain iptables.ChainName = "forward_wan_to_lan"
	PROTOCOL_TCP  string = "tcp"
	PROTOCOL_ALL  string = "all"
	PROTOCOL_UDP  string = "udp"
	PROTOCOL_ICMP string = "icmp"
)
View Source
const (
	INVALIDE        LBRULEVALIDATION = false
	VALID           LBRULEVALIDATION = true
	ADDCOMMAND      COMMAND          = 0
	DELETECOMMAND   COMMAND          = 1
	MODIFIEDCOMMAND COMMAND          = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type COMMAND

type COMMAND int

type FWRULEVALIDATION

type FWRULEVALIDATION bool
const (
	FWRULE_INVALIDE FWRULEVALIDATION = false
	FWRULE_VALID    FWRULEVALIDATION = true
)

type Iptablescontroller

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

func New

func New(intif string, extif string, fwmark uint32, iptables iptables.Interface, minSyncPeriod time.Duration) *Iptablescontroller

func (*Iptablescontroller) DeleteVPNPolicyRule added in v0.2.0

func (i *Iptablescontroller) DeleteVPNPolicyRule(key string)

func (*Iptablescontroller) OnFirewallAdd

func (n *Iptablescontroller) OnFirewallAdd(firewallrule *v1.FireWallRule) error

func (*Iptablescontroller) OnFirewallDelete

func (n *Iptablescontroller) OnFirewallDelete(firewallrule *v1.FireWallRule) error

func (*Iptablescontroller) OnFirewallUpdate

func (n *Iptablescontroller) OnFirewallUpdate(firewallrule *v1.FireWallRule) error

func (*Iptablescontroller) OnLoadbalanceAdd

func (n *Iptablescontroller) OnLoadbalanceAdd(loadbalancerrule *v1.LoadBalancerRule) error

func (*Iptablescontroller) OnLoadbalanceDelete

func (n *Iptablescontroller) OnLoadbalanceDelete(loadbalancerrule *v1.LoadBalancerRule) error

func (*Iptablescontroller) OnLoadbalanceUpdate

func (n *Iptablescontroller) OnLoadbalanceUpdate(loadbalancerrule *v1.LoadBalancerRule) error

func (*Iptablescontroller) OnNATAdd

func (n *Iptablescontroller) OnNATAdd(natrule *v1.NATRule) error

func (*Iptablescontroller) OnNATDelete

func (n *Iptablescontroller) OnNATDelete(natrule *v1.NATRule) error

func (*Iptablescontroller) OnNATUpdate

func (n *Iptablescontroller) OnNATUpdate(natrule *v1.NATRule) error

func (*Iptablescontroller) UpdateVPNPolicyRule added in v0.2.0

func (i *Iptablescontroller) UpdateVPNPolicyRule(vpn networkv1alpha1.VPN) error

type LBRULEVALIDATION

type LBRULEVALIDATION bool

type NATRULEVALIDATION

type NATRULEVALIDATION bool
const (
	NATRULE_INVALIDE NATRULEVALIDATION = false
	NATRULE_VALID    NATRULEVALIDATION = true
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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