aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-04-13 23:24:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-04-13 23:24:38 -0300
commitf55afc23e67860eed23895f1731c38bf43a32702 (patch)
treebd803e0c66d799d607fb0babbc45edc6e16a0a8c /manifests/subsystems
parentb4668a943b65d83c36193d5d079ada1dcc9e0c32 (diff)
downloadpuppet-nodo-f55afc23e67860eed23895f1731c38bf43a32702.tar.gz
puppet-nodo-f55afc23e67860eed23895f1731c38bf43a32702.tar.bz2
Adding firewall::wifi
Diffstat (limited to 'manifests/subsystems')
-rw-r--r--manifests/subsystems/firewall.pp46
1 files changed, 45 insertions, 1 deletions
diff --git a/manifests/subsystems/firewall.pp b/manifests/subsystems/firewall.pp
index 765a59f..85849c2 100644
--- a/manifests/subsystems/firewall.pp
+++ b/manifests/subsystems/firewall.pp
@@ -58,7 +58,7 @@ class firewall {
# Hosts
#
shorewall::host { "eth0-subnet":
- name => 'eth0:192.168.0.0/24',
+ name => 'eth0:192.168.0.0/24',
zone => 'vm',
options => '',
order => '1',
@@ -237,3 +237,47 @@ class firewall {
}
}
}
+
+class firewall::wifi {
+ $rfc1918 = $shorewall_dmz ? {
+ true => true,
+ false => false,
+ default => false,
+ }
+
+ $wifi_dev = $wifi_device {
+ '' => 'ath0',
+ default => $wifi_device,
+ }
+
+ #
+ # Interfaces
+ #
+ shorewall::interface { "$wifi_dev":
+ zone => '-',
+ rfc1918 => $rfc1918,
+ }
+
+ #
+ # Hosts
+ #
+ shorewall::host { "$wifi_dev-subnet":
+ name => "$wifi_dev:192.168.0.0/24",
+ zone => 'vm',
+ options => '',
+ order => '1',
+ }
+
+ shorewall::host { "$wifi_dev":
+ name => "$wifi_dev:0.0.0.0/0",
+ zone => 'net',
+ options => '',
+ order => '2',
+ }
+
+ shorewall::masq { "$wifi_dev":
+ interface => "$wifi_dev:!192.168.0.0/24",
+ source => '192.168.0.0/24',
+ order => '1',
+ }
+}