Documentation
¶
Index ¶
- type Iptables
- func (ipt *Iptables) CheckRule(table, chain string, rulespec ...string) (bool, error)
- func (ipt *Iptables) DeleteChain(table, chain string) error
- func (ipt *Iptables) DeleteRule(table, chain string, rulespec ...string) error
- func (ipt *Iptables) EnsureChain(table, chain, policy string) (bool, error)
- func (ipt *Iptables) EnsureRule(pos int, table, chain string, rulespec ...string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iptables ¶
type Iptables struct {
// contains filtered or unexported fields
}
func NewIptables ¶
func (*Iptables) CheckRule ¶ added in v0.2.0
CheckRule checks if the specified rule is present and return bool status and err.
func (*Iptables) DeleteChain ¶
DeleteRule checks if the specified rule is present and, if so, deletes it.
func (*Iptables) DeleteRule ¶
DeleteRule checks if the specified rule is present and, if so, deletes it.
func (*Iptables) EnsureChain ¶
EnsureChain checks if the specified chain exists and, if not, creates it. If the chain existed, return true.
Click to show internal directories.
Click to hide internal directories.