Documentation ¶
Index ¶
- Constants
- type Chains
- type FirewallOpener
- type IPTables
- type IPTablesController
- func (iptables *IPTablesController) BulkPrependRules(chain string, rules []Rule) error
- func (iptables *IPTablesController) CreateChain(table, chain string) error
- func (iptables *IPTablesController) DeleteChain(table, chain string) error
- func (iptables *IPTablesController) DeleteChainReferences(table, targetChain, referencedChain string) error
- func (iptables *IPTablesController) FlushChain(table, chain string) error
- func (iptables *IPTablesController) InstanceChain(instanceId string) string
- func (iptables *IPTablesController) PrependRule(chain string, rule Rule) error
- type InstanceChainCreator
- type Locksmith
- type PortForwarder
- type Rule
- type RuleTranslator
- type SingleFilterRule
- type Starter
Constants ¶
View Source
const LockKey = "/var/run/garden-iptables.lock"
View Source
const SetupScript = `` /* 7530-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallOpener ¶
type FirewallOpener struct {
// contains filtered or unexported fields
}
func NewFirewallOpener ¶
func NewFirewallOpener(ruleTranslator RuleTranslator, iptables IPTables) *FirewallOpener
func (*FirewallOpener) BulkOpen ¶
func (f *FirewallOpener) BulkOpen(logger lager.Logger, instance, handle string, rules []garden.NetOutRule) error
func (*FirewallOpener) Open ¶
func (f *FirewallOpener) Open(logger lager.Logger, instance, handle string, rule garden.NetOutRule) error
type IPTables ¶
type IPTables interface { CreateChain(table, chain string) error DeleteChain(table, chain string) error FlushChain(table, chain string) error DeleteChainReferences(table, targetChain, referencedChain string) error PrependRule(chain string, rule Rule) error BulkPrependRules(chain string, rules []Rule) error InstanceChain(instanceId string) string }
type IPTablesController ¶
type IPTablesController struct {
// contains filtered or unexported fields
}
func New ¶
func New(iptablesBinPath, iptablesRestoreBinPath string, runner commandrunner.CommandRunner, locksmith Locksmith, chainPrefix string) *IPTablesController
func (*IPTablesController) BulkPrependRules ¶
func (iptables *IPTablesController) BulkPrependRules(chain string, rules []Rule) error
func (*IPTablesController) CreateChain ¶
func (iptables *IPTablesController) CreateChain(table, chain string) error
func (*IPTablesController) DeleteChain ¶
func (iptables *IPTablesController) DeleteChain(table, chain string) error
func (*IPTablesController) DeleteChainReferences ¶
func (iptables *IPTablesController) DeleteChainReferences(table, targetChain, referencedChain string) error
func (*IPTablesController) FlushChain ¶
func (iptables *IPTablesController) FlushChain(table, chain string) error
func (*IPTablesController) InstanceChain ¶
func (iptables *IPTablesController) InstanceChain(instanceId string) string
func (*IPTablesController) PrependRule ¶
func (iptables *IPTablesController) PrependRule(chain string, rule Rule) error
type InstanceChainCreator ¶
type InstanceChainCreator struct {
// contains filtered or unexported fields
}
func NewInstanceChainCreator ¶
func NewInstanceChainCreator(iptables *IPTablesController) *InstanceChainCreator
func (*InstanceChainCreator) Destroy ¶
func (cc *InstanceChainCreator) Destroy(logger lager.Logger, instanceId string) error
type PortForwarder ¶
type PortForwarder struct {
// contains filtered or unexported fields
}
func NewPortForwarder ¶
func NewPortForwarder(iptables *IPTablesController) *PortForwarder
func (*PortForwarder) Forward ¶
func (p *PortForwarder) Forward(spec kawasaki.PortForwarderSpec) error
type RuleTranslator ¶
type RuleTranslator interface {
TranslateRule(handle string, gardenRule garden.NetOutRule) ([]Rule, error)
}
func NewRuleTranslator ¶
func NewRuleTranslator() RuleTranslator
type SingleFilterRule ¶
type SingleFilterRule struct { Protocol garden.Protocol Networks *garden.IPRange Ports *garden.PortRange ICMPs *garden.ICMPControl Log bool Handle string }
func (SingleFilterRule) Flags ¶
func (r SingleFilterRule) Flags(chain string) (params []string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.