-
Notifications
You must be signed in to change notification settings - Fork 455
/
test.pp
128 lines (108 loc) · 2.2 KB
/
test.pp
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
firewall { '000 allow foo':
dport => [7061, 7062],
action => accept,
proto => 'tcp',
}
firewall { '975 log test':
state => 'NEW',
log_level => 'panic',
jump => 'LOG'
}
firewall { '001 allow boo':
action => accept,
iniface => 'eth0',
sport => '123',
dport => '123',
proto => 'tcp',
destination => '1.1.1.0/24',
source => '2.2.2.0/24',
}
firewall { '100 snat for network foo2':
chain => 'POSTROUTING',
jump => 'MASQUERADE',
proto => 'all',
outiface => 'eth0',
source => '10.1.2.0/24',
table => 'nat'
}
firewall { '999 bar':
action => accept,
dport => '1233',
proto => 'tcp',
}
firewall { '002 foo':
action => drop,
dport => '1233',
proto => 'tcp',
}
firewall { '010 icmp':
action => accept,
proto => 'icmp',
icmp => 'echo-reply',
}
firewall { '010 INPUT allow loopback':
action => accept,
iniface => 'lo',
chain => 'INPUT',
}
firewall { '005 INPUT disregard DHCP':
action => drop,
dport => ['bootpc', 'bootps'],
proto => 'udp'
}
firewall { '006 INPUT disregard netbios':
action => drop,
proto => 'udp',
dport => ['netbios-ns', 'netbios-dgm', 'netbios-ssn'],
}
firewall { '006 Disregard CIFS':
action => drop,
dport => 'microsoft-ds',
proto => 'tcp'
}
firewall { '050 INPUT drop invalid':
action => drop,
state => 'INVALID',
}
firewall { '051 INPUT allow related and established':
action => accept,
state => ['RELATED', 'ESTABLISHED'],
}
firewall { '053 INPUT allow ICMP':
action => accept,
icmp => '8',
proto => 'icmp',
}
firewall { '055 INPUT allow DNS':
action => accept,
proto => 'udp',
sport => 'domain'
}
firewall { '056 INPUT allow web in and out':
action => accept,
proto => 'tcp',
port => 80
}
firewall { '057 INPUT limit NTP':
action => accept,
proto => 'tcp',
dport => ntp,
limit => '15/hour'
}
firewall { '999 FORWARD drop':
action => drop,
chain => 'FORWARD',
}
firewall { '001 OUTPUT allow loopback':
action => accept,
chain => 'OUTPUT',
outiface => 'lo',
}
firewall { '100 OUTPUT drop invalid':
action => drop,
chain => 'OUTPUT',
state => 'INVALID',
}
resources { 'firewall':
purge => true
}