~~~puppet
resources { 'firewall':
- purge => true
+ purge => true,
}
~~~
~~~puppet
resources { 'firewallchain':
- purge => true
+ purge => true,
}
~~~
Basic accept ICMP request example:
~~~puppet
-firewall { "000 accept all icmp requests":
- proto => "icmp",
- action => "accept",
+firewall { '000 accept all icmp requests':
+ proto => 'icmp',
+ action => 'accept',
}
~~~
Drop all:
~~~puppet
-firewall { "999 drop all other requests":
- action => "drop",
+firewall { '999 drop all other requests':
+ action => 'drop',
}
~~~
IPv6 rules can be specified using the _ip6tables_ provider:
~~~puppet
-firewall { "006 Allow inbound SSH (v6)":
+firewall { '006 Allow inbound SSH (v6)':
port => 22,
proto => tcp,
action => accept,
~~~puppet
node 'some.node.com' {
firewall { '111 open port 111':
- dport => 111
+ dport => 111,
}
}
~~~
chain => 'POSTROUTING',
jump => 'MASQUERADE',
proto => 'all',
- outiface => "eth0",
+ outiface => 'eth0',
source => '10.1.2.0/24',
table => 'nat',
}
~~~puppet
resources { 'firewallchain':
- purge => true
+ purge => true,
}
~~~