Documentation ¶
Index ¶
- Constants
- Variables
- func Exists(table Table, chain string, rule ...string) bool
- func FirewalldInit()
- func OnReloaded(callback func())
- func Passthrough(ipv IPV, args ...string) ([]byte, error)
- func Raw(args ...string) ([]byte, error)
- func RemoveExistingChain(name string, table Table) error
- type Action
- type Chain
- func (c *Chain) Forward(action Action, ip net.IP, port int, proto, destAddr string, destPort int) error
- func (c *Chain) Link(action Action, ip1, ip2 net.IP, port int, proto string) error
- func (c *Chain) Output(action Action, args ...string) error
- func (c *Chain) Prerouting(action Action, args ...string) error
- func (c *Chain) Remove() error
- type ChainError
- type Conn
- type IPV
- type Table
Constants ¶
Variables ¶
View Source
var (
ErrIptablesNotFound = errors.New("Iptables not found")
)
Functions ¶
func FirewalldInit ¶
func FirewalldInit()
func Passthrough ¶
Firewalld's passthrough method simply passes args through to iptables/ip6tables
func RemoveExistingChain ¶
Types ¶
type Chain ¶
func (*Chain) Forward ¶
func (c *Chain) Forward(action Action, ip net.IP, port int, proto, destAddr string, destPort int) error
Add forwarding rule to 'filter' table and corresponding nat rule to 'nat' table
func (*Chain) Link ¶
Add reciprocal ACCEPT rule for two supplied IP addresses. Traffic is allowed from ip1 to ip2 and vice-versa
func (*Chain) Prerouting ¶
Add linking rule to nat/PREROUTING chain.
type ChainError ¶
func (ChainError) Error ¶
func (e ChainError) Error() string
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to firewalld dbus endpoint.
Click to show internal directories.
Click to hide internal directories.