Documentation
¶
Overview ¶
Package iptablesmanage provides functionality to interact with iptables rules. You can use it to sync rules with CIDR list files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Allow ¶
Allow ensures the networks and ports are allowed by adding rules for them if they are not yet allowed.
func ApplyUpdatesFromCIDRFile ¶
ApplyUpdatesFromCIDRFile ensures the iptables rules match what is in the CIDR file.
func CSVToPorts ¶
CSVToPorts takes a comma separated string such as "80,443" and returns the ports.
Types ¶
type IPTablesRule ¶
type IPTablesRule struct { // Source CIDR. Source *net.IPNet // Destination port. DestPort int // Line number. Line int }
IPTablesRule holds an iptables rule.
func (IPTablesRule) String ¶
func (i IPTablesRule) String() string
Directories
¶
Path | Synopsis |
---|---|
Package cidrlist interacts with a CIDR list suitable for the iptables-manage program.
|
Package cidrlist interacts with a CIDR list suitable for the iptables-manage program. |
cmd
|
|
dnsrule
This program synchronizes a whitelist based firewall with IPs found from resolving a DNS record.
|
This program synchronizes a whitelist based firewall with IPs found from resolving a DNS record. |
Click to show internal directories.
Click to hide internal directories.