Control the OpenBSD packet filter (PF).
codeauthor: | Jasper Lievisse Adriaanse <j@jasper.la> |
---|
New in version 2019.2.0.
salt.modules.pf.
disable
()¶Disable the Packet Filter.
CLI example:
salt '*' pf.disable
salt.modules.pf.
enable
()¶Enable the Packet Filter.
CLI example:
salt '*' pf.enable
salt.modules.pf.
flush
(modifier)¶Flush the specified packet filter parameters.
Should be one of the following:
Please refer to the OpenBSD pfctl(8) documentation for a detailed explanation of each command.
CLI example:
salt '*' pf.flush states
salt.modules.pf.
load
(file='/etc/pf.conf', noop=False)¶Load a ruleset from the specific file, overwriting the currently loaded ruleset.
CLI example:
salt '*' pf.load /etc/pf.conf.d/lockdown.conf
salt.modules.pf.
loglevel
(level)¶Set the debug level which limits the severity of log messages printed by pf(4)
.
CLI example:
salt '*' pf.loglevel emerg
salt.modules.pf.
show
(modifier)¶Show filter parameters.
Modifier to apply for filtering. Only a useful subset of what pfctl supports can be used with Salt.
CLI example:
salt '*' pf.show rules
salt.modules.pf.
table
(command, table, **kwargs)¶Apply a command on the specified table.
Command to apply to the table. Supported commands are:
Please refer to the OpenBSD pfctl(8) documentation for a detailed explanation of each command.
CLI example:
salt '*' pf.table expire table=spam_hosts number=300
salt '*' pf.table add table=local_hosts addresses='["127.0.0.1", "::1"]'
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2019.2.1