iptm

package
v1.0.18-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IptEntry

type IptEntry struct {
	Name       string
	HashedName string
	Chain      string
	Flag       string
	Specs      []string
}

IptEntry represents an iptables rule.

type IptablesManager

type IptablesManager struct {
	OperationFlag string
}

IptablesManager stores iptables entries.

func NewIptablesManager

func NewIptablesManager() *IptablesManager

NewIptablesManager creates a new instance for IptablesManager object.

func (*IptablesManager) Add

func (iptMgr *IptablesManager) Add(entry *IptEntry) error

Add adds a rule in iptables.

func (*IptablesManager) AddChain added in v1.0.9

func (iptMgr *IptablesManager) AddChain(chain string) error

AddChain adds a chain to iptables.

func (*IptablesManager) Delete

func (iptMgr *IptablesManager) Delete(entry *IptEntry) error

Delete removes a rule in iptables.

func (*IptablesManager) DeleteChain added in v1.0.9

func (iptMgr *IptablesManager) DeleteChain(chain string) error

DeleteChain deletes a chain from iptables.

func (*IptablesManager) Exists added in v1.0.9

func (iptMgr *IptablesManager) Exists(entry *IptEntry) (bool, error)

Exists checks if a rule exists in iptables.

func (*IptablesManager) InitNpmChains

func (iptMgr *IptablesManager) InitNpmChains() error

InitNpmChains initializes Azure NPM chains in iptables.

func (*IptablesManager) Restore added in v1.0.9

func (iptMgr *IptablesManager) Restore(configFile string) error

Restore restores iptables configuration from /var/log/iptables.conf

func (*IptablesManager) Run added in v1.0.9

func (iptMgr *IptablesManager) Run(entry *IptEntry) (int, error)

Run execute an iptables command to update iptables.

func (*IptablesManager) Save added in v1.0.9

func (iptMgr *IptablesManager) Save(configFile string) error

Save saves current iptables configuration to /var/log/iptables.conf

func (*IptablesManager) UninitNpmChains

func (iptMgr *IptablesManager) UninitNpmChains() error

UninitNpmChains uninitializes Azure NPM chains in iptables.

Jump to

Keyboard shortcuts

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