Wireguard Static Configuration with Transit Net: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=Configuration= ;schnubel *cat /etc/wireguard/wg0.conf <pre> [Interface] Address = 10.84.252.45/24 PrivateKey = yBOs8znukCFcmlMKHVvDtGygrycnrWofVQZCiceJDWA= L…“)
 
 
Zeile 4: Zeile 4:
 
<pre>
 
<pre>
 
[Interface]
 
[Interface]
Address =  10.84.252.45/24
+
Address =  192.168.30.45/24
 
PrivateKey = yBOs8znukCFcmlMKHVvDtGygrycnrWofVQZCiceJDWA=
 
PrivateKey = yBOs8znukCFcmlMKHVvDtGygrycnrWofVQZCiceJDWA=
 
ListenPort = 50002
 
ListenPort = 50002
Zeile 11: Zeile 11:
 
PublicKey = ULq8e5vYRa2s4phsRBkzOvRC8g819xM0/44rII6wqTg=
 
PublicKey = ULq8e5vYRa2s4phsRBkzOvRC8g819xM0/44rII6wqTg=
 
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
 
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
AllowedIPs = 10.83.33.0/24
+
AllowedIPs = 192.168.30.33/24, 10.83.33.0/24
 
Endpoint = 10.84.252.33:50002
 
Endpoint = 10.84.252.33:50002
 
</pre>
 
</pre>
Zeile 18: Zeile 18:
 
<pre>
 
<pre>
 
[Interface]
 
[Interface]
Address =  10.84.252.33/24
+
Address =  192.168.30.33/24
 
PrivateKey = OJYseijxQRCfpFeMe3052mfDV6lhvOxpRLeVm9C520Y=  
 
PrivateKey = OJYseijxQRCfpFeMe3052mfDV6lhvOxpRLeVm9C520Y=  
 
ListenPort = 50002
 
ListenPort = 50002
Zeile 25: Zeile 25:
 
PublicKey = 80uEKK7oq3/T51TvUV5HrdwvGhd8WgEM630pz0lqTj8=
 
PublicKey = 80uEKK7oq3/T51TvUV5HrdwvGhd8WgEM630pz0lqTj8=
 
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
 
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
AllowedIPs = 10.83.45.0/24
+
AllowedIPs = 192.168.30.45/24, 10.83.45.0/24
 
Endpoint = 10.84.252.45:50002
 
Endpoint = 10.84.252.45:50002
 
</pre>
 
</pre>

Aktuelle Version vom 18. Dezember 2019, 14:05 Uhr

Configuration

schnubel
  • cat /etc/wireguard/wg0.conf
[Interface]
Address =  192.168.30.45/24
PrivateKey = yBOs8znukCFcmlMKHVvDtGygrycnrWofVQZCiceJDWA=
ListenPort = 50002

[Peer]
PublicKey = ULq8e5vYRa2s4phsRBkzOvRC8g819xM0/44rII6wqTg=
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
AllowedIPs = 192.168.30.33/24, 10.83.33.0/24
Endpoint = 10.84.252.33:50002
gustavo
  • cat /etc/wireguard/wg0.conf
[Interface]
Address =  192.168.30.33/24
PrivateKey = OJYseijxQRCfpFeMe3052mfDV6lhvOxpRLeVm9C520Y= 
ListenPort = 50002

[Peer]
PublicKey = 80uEKK7oq3/T51TvUV5HrdwvGhd8WgEM630pz0lqTj8=
PresharedKey = fSne0BxEZR6yiQYHTNUqs1uY5zJm3jS0P78poBnNkY4=
AllowedIPs = 192.168.30.45/24, 10.83.45.0/24
Endpoint = 10.84.252.45:50002

Systemctl

  • systemctl enable wg-quick@wg0.service
  • systemctl start wg-quick@wg0.service
  • systemctl status wg-quick@wg0.service
  • systemctl stop wg-quick@wg0.service

Test

schnubbel
  • wg
interface: wg0
  public key: C1YoH/VxFLS5PjkhAxi13lG/Uq6jDwxSB5xMVHzm6ys=
  private key: (hidden)
  listening port: 50002

peer: ULq8e5vYRa2s4phsRBkzOvRC8g819xM0/44rII6wqTg=
  preshared key: (hidden)
  endpoint: 10.84.252.33:50002
  allowed ips: 10.83.33.0/24
  latest handshake: 1 minute, 9 seconds ago
  transfer: 220 B received, 308 B sent