ovssnat

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnatBridgeName = "azSnatbr"
	ImdsIP         = "169.254.169.254/32"
)

Variables

This section is empty.

Functions

func AddMasqueradeRule

func AddMasqueradeRule(snatBridgeIPWithPrefix string) error

*

This function adds iptable rules that will snat all traffic that has source ip in apipa range and coming via linux bridge

*

func AddVlanDropRule

func AddVlanDropRule() error

*

Drop all vlan traffic on linux bridge

*

func CreateSnatBridge

func CreateSnatBridge(snatBridgeIP string, mainInterface string) error

*

This function creates linux bridge which will be used for outbound connectivity by NCs

*

func DeleteMasqueradeRule

func DeleteMasqueradeRule() error

func DeleteSnatBridge

func DeleteSnatBridge(bridgeName string) error

Types

type OVSSnatClient

type OVSSnatClient struct {
	SkipAddressesFromBlock []string
	// contains filtered or unexported fields
}

func NewSnatClient

func NewSnatClient(hostIfName string, contIfName string, localIP string, snatBridgeIP string, skipAddressesFromBlock []string) OVSSnatClient

func (*OVSSnatClient) AllowIPAddressesOnSnatBrdige added in v1.0.24

func (client *OVSSnatClient) AllowIPAddressesOnSnatBrdige() error

*

This fucntion adds iptables rules  that allows only specific Private IPs via linux bridge

*

func (*OVSSnatClient) AllowInboundFromHostToNC added in v1.0.24

func (client *OVSSnatClient) AllowInboundFromHostToNC() error

*

This function adds iptables rules that allows only host to NC communication and not the other way

*

func (*OVSSnatClient) AllowInboundFromNCToHost added in v1.0.24

func (client *OVSSnatClient) AllowInboundFromNCToHost() error

*

This function adds iptables rules that allows only NC to Host communication and not the other way

*

func (*OVSSnatClient) BlockIPAddressesOnSnatBrdige added in v1.0.24

func (client *OVSSnatClient) BlockIPAddressesOnSnatBrdige() error

*

This fucntion adds iptables rules  that blocks all private IPs flowing via linux bridge

*

func (*OVSSnatClient) ConfigureSnatContainerInterface

func (client *OVSSnatClient) ConfigureSnatContainerInterface() error

func (*OVSSnatClient) CreateSnatEndpoint

func (client *OVSSnatClient) CreateSnatEndpoint(bridgeName string) error

func (*OVSSnatClient) DeleteInboundFromHostToNC added in v1.0.24

func (client *OVSSnatClient) DeleteInboundFromHostToNC() error

func (*OVSSnatClient) DeleteInboundFromNCToHost added in v1.0.24

func (client *OVSSnatClient) DeleteInboundFromNCToHost() error

func (*OVSSnatClient) DeleteSnatEndpoint

func (client *OVSSnatClient) DeleteSnatEndpoint() error

func (*OVSSnatClient) MoveSnatEndpointToContainerNS

func (client *OVSSnatClient) MoveSnatEndpointToContainerNS(netnsPath string, nsID uintptr) error

*

Move container veth inside container network namespace

*

func (*OVSSnatClient) SetupSnatContainerInterface

func (client *OVSSnatClient) SetupSnatContainerInterface() error

*

Configure Routes and setup name for container veth

*

Jump to

Keyboard shortcuts

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