package iptables

import "github.com/dotcloud/docker/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) 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
v0.6.6
Published
Nov 6, 2013
Platform
windows/amd64
Imports
6 packages
Last checked
1 second ago

Tools for package owners.