package iptables
import "github.com/docker/docker/pkg/iptables"
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 NewChain(name, bridge string, table Table) (*Chain, error)
- 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 ¶
const ( Append Action = "-A" Delete Action = "-D" Insert Action = "-I" Nat Table = "nat" Filter Table = "filter" )
Variables ¶
Functions ¶
func Exists ¶
Check if a rule exists
func Raw ¶
Call 'iptables' system command, passing supplied arguments
func RemoveExistingChain ¶
Types ¶
type Action ¶
type Action string
type Chain ¶
func NewChain ¶
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 ¶
Add reciprocal ACCEPT rule for two supplied IP addresses. Traffic is allowed from ip1 to ip2 and vice-versa
func (*Chain) Output ¶
Add linking rule to an OUTPUT chain
func (*Chain) Prerouting ¶
Add linking rule to nat/PREROUTING chain.
func (*Chain) Remove ¶
type ChainError ¶
func (*ChainError) Error ¶
func (e *ChainError) Error() string
type Table ¶
type Table string
Source Files ¶
- Version
- v1.5.0-rc1
- Published
- Jan 22, 2015
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 9 minutes ago –
Tools for package owners.