Documentation
¶
Index ¶
- Constants
- Variables
- func Default(mode Mode, direction Direction) error
- func Delete(rule Rule) error
- func DeleteNumber(n int) error
- func Disable() error
- func DisableLogging() error
- func Enable() error
- func EnableLogging() error
- func Reload() error
- func Reset() error
- func Set(rule Rule) error
- type Direction
- type Host
- type Mode
- type Proto
- type Rule
- type UFW
- func (ufw UFW) Default(mode Mode, direction Direction) error
- func (ufw UFW) Delete(rule Rule) error
- func (ufw UFW) DeleteNumber(n int) error
- func (ufw UFW) Disable() error
- func (ufw UFW) DisableLogging() error
- func (ufw UFW) Enable() error
- func (ufw UFW) EnableLogging() error
- func (ufw UFW) Reload() error
- func (ufw UFW) Reset() error
- func (ufw UFW) Set(rule Rule) error
- func (ufw UFW) Status() ([]Rule, error)
Constants ¶
View Source
const ( ModeAllow Mode = "allow" ModeDeny Mode = "deny" ModeReject Mode = "reject" ModeLimit Mode = "limit" DirectionIn Direction = "in" DirectionOut Direction = "out" DirectionForward Direction = "fwd" ProtoTCP Proto = "tcp" ProtoUDP Proto = "udp" ProtoAH Proto = "ah" // valid without port number ProtoESP Proto = "esp" // valid without port number ProtoGRE Proto = "gre" // valid without port number ProtoIPV6 Proto = "ipv6" // valid for IPv4 addresses and without port number ProtoIGMP Proto = "igmp" // valid for IPv4 addresses and without port number )
Variables ¶
View Source
var ( Modes = []Mode{ModeAllow, ModeDeny, ModeReject, ModeLimit} Directions = []Direction{DirectionIn, DirectionOut, DirectionForward} Protos = []Proto{ProtoTCP, ProtoUDP, ProtoAH, ProtoESP, ProtoGRE, ProtoIPV6, ProtoIGMP} )
Functions ¶
func DeleteNumber ¶
func DisableLogging ¶
func DisableLogging() error
func EnableLogging ¶
func EnableLogging() error
Types ¶
type Host ¶
type Rule ¶
type UFW ¶
type UFW struct {
Bin string
}
func (UFW) DeleteNumber ¶
DeleteNumber the corresponding rule number
func (UFW) DisableLogging ¶
DisableLogging Logged packets use the LOG_KERN syslog facility
func (UFW) EnableLogging ¶
EnableLogging Logged packets use the LOG_KERN syslog facility
Click to show internal directories.
Click to hide internal directories.