add generator-config module

This commit is contained in:
vvzvlad
2022-08-22 04:30:06 +03:00
parent fa89ef055d
commit d8581416b7
7 changed files with 134 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Interface]
Address = 10.20.30.2/32
PrivateKey = wFOIRBeFqxu9cU/tAvKAHCOnTDsxQCe2hR02mjF/kHo=
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
#internal node
[Peer]
PublicKey = UG0rzuBEciN9XGWZnvyU+I8XEosm6Q8XKLumnk+k61o=
AllowedIPs = 10.20.30.0/24
Endpoint = 195.2.79.13:17968
PersistentKeepalive = 25

View File

@ -0,0 +1,18 @@
[Interface]
Address = 10.20.30.1/32
ListenPort = 17968
PrivateKey = iPnvzKtdDawMWNHEPDIzKq2Za2pG4EkGq1nlZmyDLlE=
PostUp = iptables -t nat -A POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
PostUp = ip rule add from `ip route | awk '/default/ {print $3; exit}'` table main
PostDown = iptables -t nat -D POSTROUTING -o `ip link show | awk -F ': ' '/state UP/ {print $2}'` -j MASQUERADE
PostDown = ip rule del from `ip route | awk '/default/ {print $3; exit}'` table main
#external node
[Peer]
PublicKey = Kph5VVV/mCx5DPVwD2vwk8RS2Lv6J8U2reVszJKyFEU=
AllowedIPs = 10.20.30.2/32, 0.0.0.0/0
#mobile-client node
[Peer]
PublicKey = B+VlF5NaHyFCeA/AX7dXQbjo9pe7VVFgvLbbO+vZvnE=
AllowedIPs = 10.20.30.3/32

View File

@ -0,0 +1,11 @@
[Interface]
Address = 10.20.30.3/32
PrivateKey = OLiqlb0Q4Ryx0QihepS0fYhgWCckZCjEE8ePu6/akkk=
DNS = 1.1.1.1, 8.8.8.8
#internal node
[Peer]
PublicKey = UG0rzuBEciN9XGWZnvyU+I8XEosm6Q8XKLumnk+k61o=
AllowedIPs = 0.0.0.0/0
Endpoint = 195.2.79.13:17968
PersistentKeepalive = 25