From 69ffd72ce9e5217ae7d205e04716c40d8c862315 Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Wed, 16 Sep 2009 17:51:56 +0200 Subject: factored everything out in its own file --- manifests/interface.pp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 manifests/interface.pp (limited to 'manifests/interface.pp') diff --git a/manifests/interface.pp b/manifests/interface.pp new file mode 100644 index 0000000..1cb5042 --- /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}-${name}": + line => "${zone} ${name} ${broadcast} ${options_real}", + } +} + -- cgit v1.2.3