Documentation ¶
Overview ¶
Package firewall is a library with utilities for creating an on device firewall
Index ¶
Constants ¶
View Source
const ( // IptablesCleanupTimeout is the timeout to perform the iptables restore command. IptablesCleanupTimeout = time.Second * 5 )
Variables ¶
This section is empty.
Functions ¶
func CreateFirewall ¶
func CreateFirewall(ctx context.Context, params CreateFirewallParams) error
CreateFirewall modifies the iptables to allow traffic on specified ports and interfaces and block traffic on specified ports and protocols.
func RestoreIptables ¶
RestoreIptables will restore the state of the iptables from a previously saved file in the provided path. This function does a best effort to restore both the ipv4 and ipv6 iptables.
Types ¶
Click to show internal directories.
Click to hide internal directories.