aboutsummaryrefslogtreecommitdiff
path: root/REFERENCE.md
blob: 9425b52d67f77d214ddef4eac377b244400d0350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

**Classes**

_Public Classes_

* [`ferm`](#ferm): Class: ferm  This class manages ferm installation and rule generation on modern linux systems  class{'ferm':   manage_service =>  true, }

_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**

* [`ferm::chain`](#fermchain): defined resource which creates all rules for one chain
* [`ferm::rule`](#fermrule): defined resource which creates a single rule in a specific chain

## Classes

### ferm

Class: ferm

This class manages ferm installation and rule generation on modern linux systems

class{'ferm':
  manage_service =>  true,
}

#### Examples

##### deploy ferm and start it

```puppet

```

#### Parameters

The following parameters are available in the `ferm` class.

##### `manage_service`

Data type: `Boolean`

Disable/Enable the management of the ferm daemon
Default value: false
Allowed values: (true|false)

##### `manage_configfile`

Data type: `Boolean`

Disable/Enable the management of the ferm default config
Default value: false
Allowed values: (true|false)

##### `configfile`

Data type: `Stdlib::Absolutepath`

Path to the config file
Default value: /etc/ferm.conf
Allowed values: Stdlib::Absolutepath

##### `disable_conntrack`

Data type: `Boolean`

Disable/Enable the generation of conntrack rules
Default value: false
Allowed values: (true|false)

##### `forward_policy`

Data type: `Ferm::Policies`

Default policy for the FORWARD chain
Default value: DROP
Allowed values: (ACCEPT|DROP|REJECT)

##### `output_policy`

Data type: `Ferm::Policies`

Default policy for the OUTPUT chain
Default value: ACCEPT
Allowed values: (ACCEPT|DROP|REJECT)

##### `input_policy`

Data type: `Ferm::Policies`

Default policy for the INPUT chain
Default value: DROP
Allowed values: (ACCEPT|DROP|REJECT)

##### `rules`

Data type: `Hash`

A hash that holds all data for ferm::rule
Default value: Empty Hash
Allowed value: Any Hash

##### `forward_log_dropped_packets`

Data type: `Boolean`

Enable/Disable logging in the FORWARD chain of packets to the kernel log, if no explicit chain matched
Default value: false
Allowed values: (true|false)

##### `output_log_dropped_packets`

Data type: `Boolean`

Enable/Disable logging in the OUTPUT chain of packets to the kernel log, if no explicit chain matched
Default value: false
Allowed values: (true|false)

##### `input_log_dropped_packets`

Data type: `Boolean`

Enable/Disable logging in the INPUT chain of packets to the kernel log, if no explicit chain matched
Default value: false
Allowed values: (true|false)

## Defined types

### ferm::chain

defined resource which creates all rules for one chain

#### Parameters

The following parameters are available in the `ferm::chain` defined type.

##### `policy`

Data type: `Ferm::Policies`

Set the default policy for a CHAIN

##### `disable_conntrack`

Data type: `Boolean`

Disable/Enable usage of conntrack

##### `chain`

Data type: `Ferm::Chains`

Name of the chain that should be managed

Default value: $name

##### `log_dropped_packets`

Data type: `Boolean`

Enable/Disable logging of packets to the kernel log, if no explicit chain matched

### ferm::rule

defined resource which creates a single rule in a specific chain

#### Parameters

The following parameters are available in the `ferm::rule` defined type.

##### `chain`

Data type: `Ferm::Chains`

Configure the chain where we want to add the rule

##### `policy`

Data type: `Ferm::Policies`

Configure what we want to do with the packet (drop, accept, log...)

##### `proto`

Data type: `Ferm::Protocols`

Which protocol do we want to match, typically UDP or TCP

##### `comment`

Data type: `String`

A comment that will be added to the ferm config and to ip{,6}tables

Default value: $name

##### `dport`

Data type: `Optional[Variant[Integer,String]]`

The destination port, can be a range as string or a single port number as integer

Default value: `undef`

##### `sport`

Data type: `Optional[Variant[Integer,String]]`

The source port, can be a range as string or a single port number as integer

Default value: `undef`

##### `saddr`

Data type: `Optional[String]`

The source address we want to match

Default value: `undef`

##### `daddr`

Data type: `Optional[String]`

The destination address we want to match

Default value: `undef`

##### `proto_options`

Data type: `Optional[String[1]]`

Optional parameters that will be passed to the protocol (for example to match specific ICMP types)

Default value: `undef`

##### `ensure`

Data type: `Enum['absent','present']`

Set the rule to present or absent

Default value: 'present'