]> git.openstreetmap.org Git - chef.git/blob - cookbooks/networking/templates/default/wireguard.network.erb
b8114382ca95519844db9ce3c6c3fb624acdf0bb
[chef.git] / cookbooks / networking / templates / default / wireguard.network.erb
1 [Match]
2 Name=wg0
3
4 [Network]
5 Address=<%= node[:networking][:wireguard][:address] %>/128
6
7 [Route]
8 Destination=fd43:e709:ea6d:1::/64
9 <% node[:networking][:wireguard][:peers].each do |peer| -%>
10 <% Array(peer[:allowed_ips]).sort.each do |ip| -%>
11 <% unless ip =~ /^fd43:e709:ea6d:1::/ -%>
12
13 [Route]
14 Destination=<%= ip %>
15 <% end -%>
16 <% end -%>
17 <% end -%>