nettool

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const BGPPort = "179"
View Source
const BgpNatChain = "PREROUTING-PORTER"

Variables

This section is empty.

Functions

func AddPortForwardOfBGP

func AddPortForwardOfBGP(iptableExec iptables.IptablesIface, routerIP, localIP string, gobgpPort int32) error

Example: iptables -t nat -A PREROUTING -s 10.10.12.1 -p tcp --dport 179 -j DNAT --to-destination 10.10.12.1:17900

func CloseForwardForEIP added in v0.3.0

func CloseForwardForEIP(iptableExec iptables.IptablesIface, eip string) error

func DeletePortForwardOfBGP

func DeletePortForwardOfBGP(iptableExec iptables.IptablesIface, routerIP, localIP string, gobgpPort int32) error

func GenerateCretiriaAndAction

func GenerateCretiriaAndAction(routerIP, localIP string, gobgpPort int32) []string

func OpenForwardForEIP added in v0.3.0

func OpenForwardForEIP(iptableExec iptables.IptablesIface, eip string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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