]> git.openstreetmap.org Git - chef.git/commitdiff
Merge http and https rules
authorTom Hughes <tom@compton.nu>
Tue, 7 Mar 2023 19:07:36 +0000 (19:07 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 7 Mar 2023 19:07:36 +0000 (19:07 +0000)
cookbooks/networking/recipes/default.rb

index dccba7c7a8be8c97d52098f7654259a2e26d36fd..831d7ce84d714c74bfd7b23753e207f30fdf1588 100644 (file)
@@ -459,17 +459,7 @@ firewall_rule "accept-http" do
   source "net"
   dest "fw"
   proto "tcp:syn"
   source "net"
   dest "fw"
   proto "tcp:syn"
-  dest_ports "http"
-  rate_limit node[:networking][:firewall][:http_rate_limit]
-  connection_limit node[:networking][:firewall][:http_connection_limit]
-end
-
-firewall_rule "accept-https" do
-  action :accept
-  source "net"
-  dest "fw"
-  proto "tcp:syn"
-  dest_ports "https"
+  dest_ports %w[http https]
   rate_limit node[:networking][:firewall][:http_rate_limit]
   connection_limit node[:networking][:firewall][:http_connection_limit]
 end
   rate_limit node[:networking][:firewall][:http_rate_limit]
   connection_limit node[:networking][:firewall][:http_connection_limit]
 end