Documentation ¶
Overview ¶
Part of this file is modified from iptables package from Kuberenetes. https://github.com/kubernetes/kubernetes/blob/master/pkg/util/iptables
Index ¶
- type IptEntry
- type IptablesManager
- func (iptMgr *IptablesManager) Add(entry *IptEntry) error
- func (iptMgr *IptablesManager) AddChain(chain string) error
- func (iptMgr *IptablesManager) Delete(entry *IptEntry) error
- func (iptMgr *IptablesManager) DeleteChain(chain string) error
- func (iptMgr *IptablesManager) Exists(entry *IptEntry) (bool, error)
- func (iptMgr *IptablesManager) InitNpmChains() error
- func (iptMgr *IptablesManager) Restore(configFile string) error
- func (iptMgr *IptablesManager) Run(entry *IptEntry) (int, error)
- func (iptMgr *IptablesManager) Save(configFile string) error
- func (iptMgr *IptablesManager) UninitNpmChains() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IptEntry ¶
type IptEntry struct { Command string Name string Chain string Flag string LockWaitTimeInSeconds string IsJumpEntry bool 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 ¶
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 ¶
func (iptMgr *IptablesManager) DeleteChain(chain string) error
DeleteChain deletes a chain from iptables.
func (*IptablesManager) Exists ¶
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 ¶
func (iptMgr *IptablesManager) Restore(configFile string) error
Restore restores iptables configuration from /var/log/iptables.conf
func (*IptablesManager) Run ¶
func (iptMgr *IptablesManager) Run(entry *IptEntry) (int, error)
Run execute an iptables command to update iptables.
func (*IptablesManager) Save ¶
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.