aboutsummaryrefslogtreecommitdiff
path: root/manifests/interface.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/interface.pp')
-rw-r--r--manifests/interface.pp27
1 files changed, 27 insertions, 0 deletions
diff --git a/manifests/interface.pp b/manifests/interface.pp
new file mode 100644
index 0000000..56b6db4
--- /dev/null
+++ b/manifests/interface.pp
@@ -0,0 +1,27 @@
+define shorewall::interface(
+ $zone,
+ $broadcast = 'detect',
+ $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
+ $rfc1918 = false,
+ $dhcp = false,
+ $order = 100
+){
+ if $rfc1918 {
+ if $dhcp {
+ $options_real = "${options},dhcp"
+ } else {
+ $options_real = $options
+ }
+ } else {
+ if $dhcp {
+ $options_real = "${options},norfc1918,dhcp"
+ } else {
+ $options_real = "${options},norfc1918"
+ }
+ }
+
+ shorewall::entry { "interfaces.d/${order}-${title}":
+ line => "${zone} ${name} ${broadcast} ${options_real}",
+ }
+}
+