]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
fix typos in puppet-strings documentation
authorTim Meusel <tim@bastelfreak.de>
Tue, 6 Oct 2020 20:41:45 +0000 (22:41 +0200)
committerTim Meusel <tim@bastelfreak.de>
Tue, 6 Oct 2020 20:41:45 +0000 (22:41 +0200)
REFERENCE.md
manifests/chain.pp
types/port.pp

index 821136b4ff4d91d3b47ea4ec53ff6fa81ed46657..4092bc16d277e44e588253a7e0e75d98deffbdad 100644 (file)
@@ -1,36 +1,38 @@
 # Reference
+
 <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
 
 ## Table of Contents
 
-**Classes**
+### Classes
 
-_Public Classes_
+#### Public Classes
 
 * [`ferm`](#ferm): This class manages ferm installation and rule generation on modern linux systems
 
-_Private Classes_
+#### Private Classes
 
 * `ferm::config`: This class handles the configuration file. Avoid modifying private classes.
 * `ferm::install`: This class handles the configuration file. Avoid modifying private classes.
 * `ferm::service`: This class handles the configuration file. Avoid modifying private classes.
 
-**Defined types**
+### Defined types
 
 * [`ferm::chain`](#fermchain): This defined resource manages ferm/iptables chains
 * [`ferm::ipset`](#fermipset): a defined resource that can match for ipsets at the top of a chain. This is a per-chain resource. You cannot mix IPv4 and IPv6 sets.
 * [`ferm::rule`](#fermrule): This defined resource manages a single rule in a specific chain
 
-**Data types**
+### Data types
 
 * [`Ferm::Actions`](#fermactions): a list of allowed actions for a rule
 * [`Ferm::Policies`](#fermpolicies): a list of allowed policies for a chain
+* [`Ferm::Port`](#fermport): ferm port-spec
 * [`Ferm::Protocols`](#fermprotocols): a list of allowed protocolls to match
 * [`Ferm::Tables`](#fermtables): a list of available tables
 
 ## Classes
 
-### ferm
+### `ferm`
 
 This class manages ferm installation and rule generation on modern linux systems
 
@@ -82,7 +84,7 @@ Data type: `Boolean`
 
 Disable/Enable the management of the ferm daemon
 
-Default value: `false`
+Default value: ``false``
 
 ##### `manage_configfile`
 
@@ -90,7 +92,7 @@ Data type: `Boolean`
 
 Disable/Enable the management of the ferm default config
 
-Default value: `false`
+Default value: ``false``
 
 ##### `manage_initfile`
 
@@ -98,7 +100,7 @@ Data type: `Boolean`
 
 Disable/Enable the management of the ferm init script for RedHat-based OS
 
-Default value: `false`
+Default value: ``false``
 
 ##### `configfile`
 
@@ -118,7 +120,7 @@ Data type: `Boolean`
 
 Enable/Disable the generation of conntrack rules for the FORWARD chain
 
-Default value: `true`
+Default value: ``true``
 
 ##### `output_disable_conntrack`
 
@@ -126,7 +128,7 @@ Data type: `Boolean`
 
 Enable/Disable the generation of conntrack rules for the OUTPUT chain
 
-Default value: `true`
+Default value: ``true``
 
 ##### `input_disable_conntrack`
 
@@ -134,7 +136,7 @@ Data type: `Boolean`
 
 Enable/Disable the generation of conntrack rules for the INPUT chain
 
-Default value: `false`
+Default value: ``false``
 
 ##### `forward_policy`
 
@@ -142,7 +144,7 @@ Data type: `Ferm::Policies`
 
 Default policy for the FORWARD chain
 
-Default value: 'DROP'
+Default value: `'DROP'`
 
 ##### `output_policy`
 
@@ -150,7 +152,7 @@ Data type: `Ferm::Policies`
 
 Default policy for the OUTPUT chain
 
-Default value: 'ACCEPT'
+Default value: `'ACCEPT'`
 
 ##### `input_policy`
 
@@ -158,7 +160,7 @@ Data type: `Ferm::Policies`
 
 Default policy for the INPUT chain
 
-Default value: 'DROP'
+Default value: `'DROP'`
 
 ##### `input_drop_invalid_packets_with_conntrack`
 
@@ -166,7 +168,7 @@ Data type: `Boolean`
 
 Enable/Disable the `mod conntrack ctstate INVALID DROP` statement. Only works if `$disable_conntrack` is `false`. You can set this to false if your policy is DROP. This only effects the INPUT chain.
 
-Default value: `false`
+Default value: ``false``
 
 ##### `rules`
 
@@ -174,7 +176,7 @@ Data type: `Hash`
 
 A hash that holds all data for ferm::rule
 
-Default value: {}
+Default value: `{}`
 
 ##### `chains`
 
@@ -182,7 +184,7 @@ Data type: `Hash`
 
 A hash that holds all data for ferm::chain
 
-Default value: {}
+Default value: `{}`
 
 ##### `forward_log_dropped_packets`
 
@@ -190,7 +192,7 @@ Data type: `Boolean`
 
 Enable/Disable logging in the FORWARD chain of packets to the kernel log, if no explicit chain matched
 
-Default value: `false`
+Default value: ``false``
 
 ##### `output_log_dropped_packets`
 
@@ -198,7 +200,7 @@ Data type: `Boolean`
 
 Enable/Disable logging in the OUTPUT chain of packets to the kernel log, if no explicit chain matched
 
-Default value: `false`
+Default value: ``false``
 
 ##### `input_log_dropped_packets`
 
@@ -206,7 +208,7 @@ Data type: `Boolean`
 
 Enable/Disable logging in the INPUT chain of packets to the kernel log, if no explicit chain matched
 
-Default value: `false`
+Default value: ``false``
 
 ##### `ip_versions`
 
@@ -214,7 +216,7 @@ Data type: `Array[Enum['ip','ip6']]`
 
 Set list of versions of ip we want ot use.
 
-Default value: ['ip','ip6']
+Default value: `['ip','ip6']`
 
 ##### `preserve_chains_in_tables`
 
@@ -223,7 +225,7 @@ Data type: `Hash[String[1],Array[String[1]]]`
 Hash with table:chains[] to use ferm @preserve for (since ferm v2.4)
 Example: {'nat' => ['PREROUTING', 'POSTROUTING']}
 
-Default value: {}
+Default value: `{}`
 
 ##### `install_method`
 
@@ -231,7 +233,7 @@ Data type: `Enum['package','vcsrepo']`
 
 method used to install ferm
 
-Default value: 'package'
+Default value: `'package'`
 
 ##### `vcsrepo`
 
@@ -239,7 +241,7 @@ Data type: `Stdlib::HTTPSUrl`
 
 git repository where ferm sources are hosted
 
-Default value: 'https://github.com/MaxKellermann/ferm.git'
+Default value: `'https://github.com/MaxKellermann/ferm.git'`
 
 ##### `vcstag`
 
@@ -247,11 +249,11 @@ Data type: `String[1]`
 
 git tag used when install_method is vcsrepo
 
-Default value: 'v2.5.1'
+Default value: `'v2.5.1'`
 
 ## Defined types
 
-### ferm::chain
+### `ferm::chain`
 
 This defined resource manages ferm/iptables chains
 
@@ -277,7 +279,7 @@ Data type: `Boolean`
 
 Disable/Enable usage of conntrack. By default, we enable conntrack only for the filter INPUT chain
 
-Default value: `true`
+Default value: ``true``
 
 ##### `drop_invalid_packets_with_conntrack`
 
@@ -285,7 +287,7 @@ Data type: `Boolean`
 
 Enable/Disable the `mod conntrack ctstate INVALID DROP` statement. Only works if `$disable_conntrack` is `false` in this chain. You can set this to false if your policy is DROP.
 
-Default value: `false`
+Default value: ``false``
 
 ##### `log_dropped_packets`
 
@@ -293,7 +295,7 @@ Data type: `Boolean`
 
 Enable/Disable logging of packets to the kernel log, if no explicit chain matched
 
-Default value: `false`
+Default value: ``false``
 
 ##### `policy`
 
@@ -302,7 +304,7 @@ Data type: `Optional[Ferm::Policies]`
 Set the default policy for CHAIN (works only for builtin chains)
 Allowed values: (ACCEPT|DROP) (see Ferm::Policies type)
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `chain`
 
@@ -311,7 +313,7 @@ Data type: `String[1]`
 Name of the chain that should be managed
 Allowed values: String[1]
 
-Default value: $name
+Default value: `$name`
 
 ##### `table`
 
@@ -320,7 +322,7 @@ Data type: `Ferm::Tables`
 Select the target table (filter/raw/mangle/nat)
 Allowed values: (filter|raw|mangle|nat) (see Ferm::Tables type)
 
-Default value: 'filter'
+Default value: `'filter'`
 
 ##### `ip_versions`
 
@@ -328,22 +330,22 @@ Data type: `Array[Enum['ip', 'ip6']]`
 
 Set list of versions of ip we want ot use.
 
-Default value: $ferm::ip_versions
+Default value: `$ferm::ip_versions`
 
 ##### `content`
 
 Data type: `Optional[String[1]]`
 
+custom string that will be written into th chain file
 
+Default value: ``undef``
 
-Default value: `undef`
-
-### ferm::ipset
+### `ferm::ipset`
 
 a defined resource that can match for ipsets at the top of a chain. This is a per-chain resource. You cannot mix IPv4 and IPv6 sets.
 
 * **See also**
-http://ferm.foo-projects.org/download/2.1/ferm.html#set
+  * http://ferm.foo-projects.org/download/2.1/ferm.html#set
 
 #### Examples
 
@@ -387,7 +389,7 @@ Data type: `String[1]`
 
 name of the chain we want to apply those rules to. The name of the defined resource will be used as default value for this.
 
-Default value: $name
+Default value: `$name`
 
 ##### `table`
 
@@ -395,7 +397,7 @@ Data type: `Ferm::Tables`
 
 name of the table where we want to apply  this. Defaults to `filter` because that's the most common usecase.
 
-Default value: 'filter'
+Default value: `'filter'`
 
 ##### `ip_version`
 
@@ -403,7 +405,7 @@ Data type: `Enum['ip','ip6']`
 
 sadly, ip sets are version specific. You cannot mix IPv4 and IPv6 addresses. Because of this you need to provide the version.
 
-Default value: 'ip'
+Default value: `'ip'`
 
 ##### `prepend_to_chain`
 
@@ -411,9 +413,9 @@ Data type: `Boolean`
 
 By default, ipset rules are added to the top of the chain. Set this to false to append them to the end instead.
 
-Default value: `true`
+Default value: ``true``
 
-### ferm::rule
+### `ferm::rule`
 
 This defined resource manages a single rule in a specific chain
 
@@ -486,7 +488,7 @@ Data type: `String`
 
 A comment that will be added to the ferm config and to ip{,6}tables
 
-Default value: $name
+Default value: `$name`
 
 ##### `action`
 
@@ -496,7 +498,7 @@ Configure what we want to do with the packet (drop/accept/reject, can also be a
 Default value: undef
 Allowed values: (RETURN|ACCEPT|DROP|REJECT|NOTRACK|LOG|MARK|DNAT|SNAT|MASQUERADE|REDIRECT|String[1])
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `policy`
 
@@ -506,23 +508,23 @@ Configure what we want to do with the packet (drop/accept/reject, can also be a
 Default value: undef
 Allowed values: (RETURN|ACCEPT|DROP|REJECT|NOTRACK|LOG|MARK|DNAT|SNAT|MASQUERADE|REDIRECT|String[1])
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `dport`
 
-Data type: `Optional[Variant[Stdlib::Port,Array[Stdlib::Port]]]`
+Data type: `Optional[Ferm::Port]`
 
 The destination port, can be a single port number as integer or an Array of integers (which will then use the multiport matcher)
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `sport`
 
-Data type: `Optional[Variant[Stdlib::Port,Array[Stdlib::Port]]]`
+Data type: `Optional[Ferm::Port]`
 
 The source port, can be a single port number as integer or an Array of integers (which will then use the multiport matcher)
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `saddr`
 
@@ -530,7 +532,7 @@ Data type: `Optional[Variant[Array, String[1]]]`
 
 The source address we want to match
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `daddr`
 
@@ -538,7 +540,7 @@ Data type: `Optional[Variant[Array, String[1]]]`
 
 The destination address we want to match
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `proto_options`
 
@@ -546,7 +548,7 @@ Data type: `Optional[String[1]]`
 
 Optional parameters that will be passed to the protocol (for example to match specific ICMP types)
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `interface`
 
@@ -554,7 +556,7 @@ Data type: `Optional[String[1]]`
 
 an Optional interface where this rule should be applied
 
-Default value: `undef`
+Default value: ``undef``
 
 ##### `ensure`
 
@@ -562,7 +564,7 @@ Data type: `Enum['absent','present']`
 
 Set the rule to present or absent
 
-Default value: 'present'
+Default value: `'present'`
 
 ##### `table`
 
@@ -572,29 +574,39 @@ Select the target table (filter/raw/mangle/nat)
 Default value: filter
 Allowed values: (filter|raw|mangle|nat) (see Ferm::Tables type)
 
-Default value: 'filter'
+Default value: `'filter'`
 
 ## Data types
 
-### Ferm::Actions
+### `Ferm::Actions`
 
 As you can also *jump* to other chains, each chain-name is also a valid action/target
 
 Alias of `Variant[Enum['RETURN', 'ACCEPT', 'DROP', 'REJECT', 'NOTRACK', 'LOG', 'MARK', 'DNAT', 'SNAT', 'MASQUERADE', 'REDIRECT'], String[1]]`
 
-### Ferm::Policies
+### `Ferm::Policies`
 
 a list of allowed policies for a chain
 
 Alias of `Enum['ACCEPT', 'DROP']`
 
-### Ferm::Protocols
+### `Ferm::Port`
+
+allowed variants:
+-----------------
++ single Integer port
++ Array of Integers (creates a multiport matcher)
++ ferm range port-spec (pair of colon-separated integer, assumes 0 if first is omitted)
+
+Alias of `Variant[Stdlib::Port, Array[Stdlib::Port], Pattern['^\d*:\d+$']]`
+
+### `Ferm::Protocols`
 
 a list of allowed protocolls to match
 
 Alias of `Variant[Enum['icmp', 'tcp', 'udp', 'udplite', 'icmpv6', 'esp', 'ah', 'sctp', 'mh', 'all'], Array[Enum['icmp', 'tcp', 'udp', 'udplite', 'icmpv6', 'esp', 'ah', 'sctp', 'mh', 'all']]]`
 
-### Ferm::Tables
+### `Ferm::Tables`
 
 a list of available tables
 
index 91cd930732870dbee5b27ae35006d5f46010017e..cfa4f803749e1640648756b40fb6d99ddf34d3ef 100644 (file)
@@ -17,6 +17,7 @@
 # @param table Select the target table (filter/raw/mangle/nat)
 #   Allowed values: (filter|raw|mangle|nat) (see Ferm::Tables type)
 # @param ip_versions Set list of versions of ip we want ot use.
+# @param content custom string that will be written into th chain file
 #
 define ferm::chain (
   Boolean $log_dropped_packets                 = false,
index dc2b7e1c3ee9195b6e6813b7f6eebfc033b6794b..da2ea23072d60849492de833ce751e681cd11ff5 100644 (file)
@@ -5,7 +5,6 @@
 # + single Integer port
 # + Array of Integers (creates a multiport matcher)
 # + ferm range port-spec (pair of colon-separated integer, assumes 0 if first is omitted)
-
 type Ferm::Port = Variant[
   Stdlib::Port,
   Array[Stdlib::Port],