diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-08-24 11:28:25 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-08-24 11:28:25 -0300 |
commit | 5348aafd849d59887051514a004b3c2d4730c8b3 (patch) | |
tree | e0a3800bba825e7691987889f82de953a7f4b18c /manifests/init.pp | |
parent | 5aca8c2eaa54726ad0d4e643a50dc6a8ad9a5a97 (diff) | |
download | puppet-shorewall-5348aafd849d59887051514a004b3c2d4730c8b3.tar.gz puppet-shorewall-5348aafd849d59887051514a004b3c2d4730c8b3.tar.bz2 |
Adding traffic shapping support via tcdevices, tcrules and tcclasses
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index c93b260..84ce030 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -202,6 +202,30 @@ class shorewall { } } + # See http://www.shorewall.net/3.0/traffic_shaping.htm + managed_file { tcdevices: } + define tcdevices($in_bandwidth, $out_bandwidth, $order='100'){ + entry { "tcdevices.d/${order}-${title}": + line => "${name} ${in_bandwidth} ${out_bandwidth}", + } + } + + # See http://www.shorewall.net/3.0/traffic_shaping.htm + managed_file { tcrules: } + define tcrules($source, $destination, $protocol, $ports , $order='1'){ + entry { "tcrules.d/${order}-${title}": + line => "# ${name}\n${order} ${source} ${destination} ${protocol} ${ports}", + } + } + + # See http://www.shorewall.net/3.0/traffic_shaping.htm + managed_file { tcclasses: } + define tcclasses($rate, $ceil, $priority, $options , $order='1'){ + entry { "tcclasses.d/${order}-${title}": + line => "${name} ${order} ${rate} ${ceil} ${priority} ${options}", + } + } + # See http://shorewall.net/shorewall_extension_scripts.htm define extension_script($script = '') { case $name { |