firewalld

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel         string `json:"log_level"`
	ZoneTargetPolicy string `json:"zone_target_policy"`
}

type FirewallCmd

type FirewallCmd struct {
	Config Config
	// contains filtered or unexported fields
}

func New

func New() (*FirewallCmd, error)

func (*FirewallCmd) BlockIP

func (fwc *FirewallCmd) BlockIP(address net.IP) error

func (*FirewallCmd) BlockIPList

func (fwc *FirewallCmd) BlockIPList(blacklist []net.IP) error

func (*FirewallCmd) ResetFirewallRules

func (fwc *FirewallCmd) ResetFirewallRules() error

func (*FirewallCmd) UnblockIP

func (fwc *FirewallCmd) UnblockIP(address net.IP) error

type RichRule

type RichRule struct {
	IPFamily string
	IP       net.IP
	Rule     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL