]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/recipes/default.rb
Remove unused template
[chef.git] / cookbooks / networking / recipes / default.rb
index 831d7ce84d714c74bfd7b23753e207f30fdf1588..f3371490069870b74f1d26fde1b8e053142f9919 100644 (file)
@@ -438,17 +438,11 @@ else
 end
 
 if node[:networking][:wireguard][:enabled]
-  wireguard_source = if node[:roles].include?("gateway")
-                       "net"
-                     else
-                       "osm"
-                     end
-
   firewall_rule "accept-wireguard" do
     action :accept
-    source wireguard_source
-    dest "fw"
-    proto "udp"
+    context :incoming
+    protocol :udp
+    source :osm unless node[:roles].include?("gateway")
     dest_ports "51820"
     source_ports "51820"
   end
@@ -456,9 +450,8 @@ end
 
 firewall_rule "accept-http" do
   action :accept
-  source "net"
-  dest "fw"
-  proto "tcp:syn"
+  context :incoming
+  protocol :tcp
   dest_ports %w[http https]
   rate_limit node[:networking][:firewall][:http_rate_limit]
   connection_limit node[:networking][:firewall][:http_connection_limit]