Documentation ¶
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 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.
Click to show internal directories.
Click to hide internal directories.