iptables

package
v0.0.0-...-53a29fe Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SetupScript = `` /* 6274-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewFilterChain

func NewFilterChain(cfg FilterConfig, runner command_runner.CommandRunner, logger lager.Logger) *filterChain

func NewNATChain

func NewNATChain(cfg NATConfig, runner command_runner.CommandRunner, logger lager.Logger) *natChain

Types

type Chain

type Chain interface {
	Setup(instanceChain, bridgeName string, ip net.IP, network *net.IPNet) error
	Teardown(instanceChain string) error
}

type FilterConfig

type FilterConfig struct {
	AllowHostAccess bool
	InputChain      string
	ForwardChain    string
	DefaultChain    string
}

type Manager

type Manager struct {
	Chains []Chain
	*Starter
}

func NewManager

func NewManager(fc FilterConfig, nc NATConfig, chainPrefix, nicPrefix string, runner command_runner.CommandRunner, logger lager.Logger) *Manager

func (*Manager) Apply

func (mgr *Manager) Apply(instanceChain, bridgeName string, ip net.IP, network *net.IPNet) error

func (*Manager) Destroy

func (mgr *Manager) Destroy(instanceChain string) error

type NATConfig

type NATConfig struct {
	PreroutingChain  string
	PostroutingChain string
}

type PortForwarder

type PortForwarder struct {
	// contains filtered or unexported fields
}

func NewPortForwarder

func NewPortForwarder(runner command_runner.CommandRunner) *PortForwarder

func (*PortForwarder) Forward

func (p *PortForwarder) Forward(spec *kawasaki.PortForwarderSpec) error

type Starter

type Starter struct {
	// contains filtered or unexported fields
}

func NewStarter

func NewStarter(runner command_runner.CommandRunner, fc FilterConfig, nc NATConfig, chainPrefix, nicPrefix string) *Starter

func (Starter) Start

func (s Starter) Start() error

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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