juju: github.com/juju/juju/network/iptables Index | Files

package iptables

import "github.com/juju/juju/network/iptables"

Index

Package Files

iptables.go

func ParseIngressRules Uses

func ParseIngressRules(r io.Reader) ([]network.IngressRule, error)

ParseIngressRules parses the output of "iptables -L INPUT -n", extracting previously added ingress rules, as rendered by IngressRuleCommand.

type AcceptInternalCommand Uses

type AcceptInternalCommand struct {
    DestinationAddress string
    DestinationPort    int
    Protocol           string
}

AcceptInternalCommand represents an iptables ACCEPT target command, for accepting traffic, optionally specifying a protocol, destination address, and destination port.

This is intended only for allowing traffic according to Juju's internal rules, e.g. for API or SSH. This should not be used for managing the ingress rules for exposing applications.

func (AcceptInternalCommand) Render Uses

func (c AcceptInternalCommand) Render() string

Render renders the command to a string which can be executed via bash in order to install the iptables rule.

type DropCommand Uses

type DropCommand struct {
    DestinationAddress string
    Interface          string
}

DropCommand represents an iptables DROP target command.

func (DropCommand) Render Uses

func (c DropCommand) Render() string

Render renders the command to a string which can be executed via bash in order to install the iptables rule.

type IngressRuleCommand Uses

type IngressRuleCommand struct {
    Rule               network.IngressRule
    DestinationAddress string
    Delete             bool
}

IngressRuleCommand represents an iptables ACCEPT target command for ingress rules.

func (IngressRuleCommand) Render Uses

func (c IngressRuleCommand) Render() string

Render renders the command to a string which can be executed via bash in order to install the iptables rule.

Package iptables imports 8 packages (graph) and is imported by 3 packages. Updated 2019-08-27. Refresh now. Tools for package owners.