pfSetup

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

pfSetup, contains wrappers for the most common 'pfctl' commands and functions to fully configure a pf setup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRuleSet

func CheckRuleSet(filePath string) (string, error)

CheckRuleSet, runs `pfctl -n` to check the syntax validity of the pf rules of the file at the given filePath.

func EnablePF

func EnablePF() (string, error)

EnablePF, enables PF. The firewall starts filtering packets, it is just as running 'pfctl -e'.

func PFSetup

func PFSetup(infoLog *log.Logger) error

PFSetup, does all the required configurations on /etc/rc.conf to have pf working after rebooting the system. Furthermore, it also initializes pflog at boot. This function accepts a *log.Logger informational logger to print out information after running commands.

func RCEnablePF

func RCEnablePF() (string, error)

RCEnablePF, enable pf in /etc/rc.conf. So that it starts at boot.

func RCEnablePflog

func RCEnablePflog() (string, error)

RCEnablePflog, enable pflog in /etc/rc.conf. So that it starts at boot.

Types

This section is empty.

Jump to

Keyboard shortcuts

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