Archive abandoned project
This commit is contained in:
parent
bc8862d90b
commit
65be894048
501 changed files with 24305 additions and 0 deletions
11
esh_wireguard/templates/default/peer.wg0.conf.erb
Normal file
11
esh_wireguard/templates/default/peer.wg0.conf.erb
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Interface]
|
||||
PrivateKey = <%= @privkey %>
|
||||
Address = <%= @address %>
|
||||
<% if defined?(@dns) %>
|
||||
DNS = <%= @dns %>
|
||||
<% end %>
|
||||
|
||||
[Peer]
|
||||
PublicKey = <%= @pubkey %>
|
||||
AllowedIPs = <%= @allowedips %>
|
||||
Endpoint = <%= @endpoint %>
|
14
esh_wireguard/templates/default/server.wg0.conf.erb
Normal file
14
esh_wireguard/templates/default/server.wg0.conf.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Interface]
|
||||
PrivateKey = <%= @privkey %>
|
||||
Address = <%= @address %>
|
||||
ListenPort = <%= @listenport %>
|
||||
SaveConfig = true
|
||||
|
||||
<% if node['esh']['wireguard']['server']['routing'] %>
|
||||
PostUp = ufw route allow in on wg0 out on <%= @pubint %>
|
||||
PostUp = iptables -t nat -I POSTROUTING -o <%= @pubint %> -j MASQUERADE
|
||||
PostUp = ip6tables -t nat -I POSTROUTING -o <%= @pubint %> -j MASQUERADE
|
||||
PreDown = ufw route delete allow in on wg0 out on <%= @pubint %>
|
||||
PreDown = iptables -t nat -D POSTROUTING -o <%= @pubint %> -j MASQUERADE
|
||||
PreDown = ip6tables -t nat -D POSTROUTING -o <%= @pubint %> -j MASQUERADE
|
||||
<% end %>
|
Reference in a new issue