default[:networking][:firewall][:inet] = []
default[:networking][:firewall][:inet6] = []
+default[:networking][:firewall][:http_connection_limit] = "-"
default[:networking][:interfaces] = {}
default[:networking][:nameservers] = []
default[:networking][:search] = []
:proto => params[:proto],
:dest_ports => params[:dest_ports] || "-",
:source_ports => params[:source_ports] || "-",
- :rate_limit => params[:rate_limit] || "-"
+ :rate_limit => params[:rate_limit] || "-",
+ :connection_limit => params[:connection_limit] || "-"
]
if params[:family].nil?
dest "fw"
proto "tcp:syn"
dest_ports "http"
+ connection_limit node[:networking][:firewall][:http_connection_limit]
end
firewall_rule "accept-https" do
dest "fw"
proto "tcp:syn"
dest_ports "https"
+ connection_limit node[:networking][:firewall][:http_connection_limit]
end
SECTION NEW
<% end -%>
-# ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE
+# ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER MARK CONNLIMIT
# PORTS PORTS DEST LIMIT
<% node[:networking][:firewall][@family].each do |r| # ~FC034 -%>
-<%= r[:action] %> <%= r[:source] %> <%= r[:dest] %> <%= r[:proto] %> <%= r[:dest_ports] %> <%= r[:source_ports] %> - <%= r[:rate_limit] %>
+<%= r[:action] %> <%= r[:source] %> <%= r[:dest] %> <%= r[:proto] %> <%= r[:dest_ports] %> <%= r[:source_ports] %> - <%= r[:rate_limit] %> - - <%= r[:connection_limit] %>
<% end -%>
}
}
},
+ :networking => {
+ :firewall => {
+ :http_connection_limit => 10
+ }
+ },
:apache => {
:mpm => "event",
:keepalive => true,