Commit eda4f69c authored by Silvio Rhatto's avatar Silvio Rhatto

Adding boilerplate files and minor fixes

parent 5348aafd
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
#
# Shorewall version 4 - Tcclasses File
#
# For information about entries in this file, type "man shorewall-tcclasses"
#
# See http://shorewall.net/traffic_shaping.htm for additional information.
#
###############################################################################
#INTERFACE:CLASS MARK RATE CEIL PRIORITY OPTIONS
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
#
# Shorewall version 4 - Tcdevices File
#
# For information about entries in this file, type "man shorewall-tcdevices"
#
# See http://shorewall.net/traffic_shaping.htm for additional information.
#
###############################################################################
#NUMBER: IN-BANDWITH OUT-BANDWIDTH OPTIONS REDIRECTED
#INTERFACE INTERFACES
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
#
# Shorewall version 4 - Tcrules File
#
# For information about entries in this file, type "man shorewall-tcrules"
#
# See http://shorewall.net/traffic_shaping.htm for additional information.
# For usage in selecting among multiple ISPs, see
# http://shorewall.net/MultiISP.html
#
# See http://shorewall.net/PacketMarking.html for a detailed description of
# the Netfilter/Shorewall packet marking mechanism.
######################################################################################################################
#MARK SOURCE DEST PROTO DEST SOURCE USER TEST LENGTH TOS CONNBYTES HELPER
# PORT(S) PORT(S)
......@@ -204,25 +204,25 @@ class shorewall {
# See http://www.shorewall.net/3.0/traffic_shaping.htm
managed_file { tcdevices: }
define tcdevices($in_bandwidth, $out_bandwidth, $order='100'){
define tcdevices($in_bandwidth, $out_bandwidth, $options = '-', $redirected_interfaces = '', $order='100'){
entry { "tcdevices.d/${order}-${title}":
line => "${name} ${in_bandwidth} ${out_bandwidth}",
line => "${name} ${in_bandwidth} ${out_bandwidth} ${options} ${redirected_interfaces}",
}
}
# See http://www.shorewall.net/3.0/traffic_shaping.htm
managed_file { tcrules: }
define tcrules($source, $destination, $protocol, $ports , $order='1'){
define tcrules($source, $destination, $protocol = 'all', $ports, $client_ports = '-', $order='1'){
entry { "tcrules.d/${order}-${title}":
line => "# ${name}\n${order} ${source} ${destination} ${protocol} ${ports}",
line => "# ${name}\n${order} ${source} ${destination} ${protocol} ${ports} ${client_ports}",
}
}
# See http://www.shorewall.net/3.0/traffic_shaping.htm
managed_file { tcclasses: }
define tcclasses($rate, $ceil, $priority, $options , $order='1'){
define tcclasses($interface, $rate, $ceil, $priority, $options = '' , $order='1'){
entry { "tcclasses.d/${order}-${title}":
line => "${name} ${order} ${rate} ${ceil} ${priority} ${options}",
line => "# ${name}\n${interface} ${order} ${rate} ${ceil} ${priority} ${options}",
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment