Documentation ¶
Index ¶
- Constants
- Variables
- func Exists(args ...string) bool
- func Raw(args ...string) ([]byte, error)
- func RemoveExistingChain(name string, table Table) error
- type Action
- type Chain
- func (c *Chain) Forward(action Action, ip net.IP, port int, proto, destAddr string, destPort int) error
- func (c *Chain) Link(action Action, ip1, ip2 net.IP, port int, proto string) error
- func (c *Chain) Output(action Action, args ...string) error
- func (c *Chain) Prerouting(action Action, args ...string) error
- func (c *Chain) Remove() error
- type ChainError
- type Table
Constants ¶
Variables ¶
View Source
var (
ErrIptablesNotFound = errors.New("Iptables not found")
)
Functions ¶
func RemoveExistingChain ¶
Types ¶
type Chain ¶
func (*Chain) Forward ¶
func (c *Chain) Forward(action Action, ip net.IP, port int, proto, destAddr string, destPort int) error
Add forwarding rule to 'filter' table and corresponding nat rule to 'nat' table
func (*Chain) Link ¶ added in v1.5.0
Add reciprocal ACCEPT rule for two supplied IP addresses. Traffic is allowed from ip1 to ip2 and vice-versa
func (*Chain) Prerouting ¶
Add linking rule to nat/PREROUTING chain.
type ChainError ¶ added in v1.4.0
func (*ChainError) Error ¶ added in v1.4.0
func (e *ChainError) Error() string
Click to show internal directories.
Click to hide internal directories.