summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/boilerplate/mangle.footer1
-rw-r--r--files/boilerplate/mangle.header7
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/mangle.pp19
4 files changed, 29 insertions, 0 deletions
diff --git a/files/boilerplate/mangle.footer b/files/boilerplate/mangle.footer
new file mode 100644
index 0000000..6bebc05
--- /dev/null
+++ b/files/boilerplate/mangle.footer
@@ -0,0 +1 @@
+#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
diff --git a/files/boilerplate/mangle.header b/files/boilerplate/mangle.header
new file mode 100644
index 0000000..7a7b12a
--- /dev/null
+++ b/files/boilerplate/mangle.header
@@ -0,0 +1,7 @@
+#
+# Shorewall - Mangle File
+#
+# For additional information, see http://shorewall.net/manpages/shorewall-mangle.html
+#
+#######################################################################################
+#ACTION SOURCE DESTINATION PROTO DSTPORT SRCPORT USER TEST LENGTH TOS CONNBYTES HELPER HEADERS
diff --git a/manifests/init.pp b/manifests/init.pp
index cd6488b..a567564 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -68,6 +68,8 @@ class shorewall(
'tunnel',
# See http://www.shorewall.net/MultiISP.html
'rtrules',
+ # See http://www.shorewall.net/manpages/shorewall-mangle.html
+ 'mangle',
]:;
}
}
diff --git a/manifests/mangle.pp b/manifests/mangle.pp
new file mode 100644
index 0000000..e3fd1b3
--- /dev/null
+++ b/manifests/mangle.pp
@@ -0,0 +1,19 @@
+define shorewall::mangle(
+ $source,
+ $destination,
+ $proto = '-',
+ $destinationport = '-',
+ $sourceport = '-',
+ $user = '-',
+ $test = '-',
+ $length = '-',
+ $tos = '-',
+ $connbytes = '-',
+ $helper = '-',
+ $headers = '-',
+ $order = '100'
+){
+ shorewall::entry{"mangle-${order}-${name}":
+ line => "${name} ${source} ${destination} ${proto} ${destinationport} ${sourceport} ${user} ${test} ${length} ${tos} ${connbytes} ${helper} ${headers}"
+ }
+}