package iptables

import "github.com/docker/docker/pkg/iptables"

Index

Variables

var (
	ErrIptablesNotFound = errors.New("Iptables not found")
)

Functions

func Exists

func Exists(args ...string) bool

Check if an existing rule exists

func Raw

func Raw(args ...string) ([]byte, error)

func RemoveExistingChain

func RemoveExistingChain(name string) error

Types

type Action

type Action string
const (
	Add    Action = "-A"
	Delete Action = "-D"
)

type Chain

type Chain struct {
	Name   string
	Bridge string
}

func NewChain

func NewChain(name, bridge string) (*Chain, error)

func (*Chain) Forward

func (c *Chain) Forward(action Action, ip net.IP, port int, proto, dest_addr string, dest_port int) error

func (*Chain) Output

func (c *Chain) Output(action Action, args ...string) error

func (*Chain) Prerouting

func (c *Chain) Prerouting(action Action, args ...string) error

func (*Chain) Remove

func (c *Chain) Remove() error

Source Files

iptables.go

Version
v1.0.0
Published
Jun 8, 2014
Platform
js/wasm
Imports
7 packages
Last checked
2 minutes ago

Tools for package owners.