default[:networking][:search] = []
default[:networking][:dnssec] = "allow-downgrade"
default[:networking][:hostname] = node.name
-default[:networking][:wireguard][:enabled] = false
+default[:networking][:wireguard][:enabled] = true
default[:networking][:wireguard][:keepalive] = false
default[:networking][:wireguard][:peers] = []
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 "net"
+ source wireguard_source
dest "fw"
proto "udp"
dest_ports "51820"
description "Role applied to all network gateways"
default_attributes(
- :networking => {
- :wireguard => { :enabled => true }
- },
:sysctl => {
:network_forwarding => {
:comment => "Enable forwarding",
:prefix => "125",
:gateway => "2800:1e0:a01:a006::69"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "125",
:gateway => "2800:1e0:a01:a006::69"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "64",
:gateway => "2605:2700:0:17::1"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "32",
:gateway => "85.214.255.86"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "64",
:gateway => "2a02:180:1:1::1"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "64",
:gateway => "2001:878:346::97"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {
:prefix => "24",
:gateway => "94.20.20.1"
}
+ },
+ :wireguard => {
+ :enabled => false
}
},
:squid => {