User Tools

Site Tools


wireguard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wireguard [2021/02/23 07:43] – [Create Config] baumiwireguard [2021/05/09 10:31] (current) – [Assign Link Network to Wireguard-Tunnel] baumi
Line 13: Line 13:
 **Host A** **Host A**
 <code> <code>
-# wg genkey > privateA +root@hosta # wg genkey > privateA 
-# wg pubkey < privateA > publicA+root@hosta # wg pubkey < privateA > publicA
 </code> </code>
  
 **Host B** **Host B**
 <code> <code>
-# wg genkey > privateB +root@hostb # wg genkey > privateB 
-# wg pubkey < privateB > publicB+root@hostb # wg pubkey < privateB > publicB
 </code> </code>
  
-{{tag>kb linux}} 
 ===== Assign Link Network to Wireguard-Tunnel ===== ===== Assign Link Network to Wireguard-Tunnel =====
-Link-Network: 172.24.0.0/30 +  Link-Network: 172.24.0.0/30 
-HostA: 172.24.0.1/30 +  HostA: 172.24.0.1/30 
-Host2: 172.24.0.2/30+  HostB: 172.24.0.2/30
  
 ===== Create Config ===== ===== Create Config =====
 **Host A** **Host A**
 <code> <code>
-# cat /etc/wireguard/wg0.conf+root@hosta # cat /etc/wireguard/wg0.conf
 # HostA - HostB # HostA - HostB
 [Interface] [Interface]
Line 46: Line 45:
 **Host B** **Host B**
 <code> <code>
-# cat /etc/wireguard/wg0.conf+root@hostb # cat /etc/wireguard/wg0.conf
 # HostB - HostA # HostB - HostA
 [Interface] [Interface]
Line 62: Line 61:
 ===== Start Wireguard Tunnel ===== ===== Start Wireguard Tunnel =====
 Issue on both hosts Issue on both hosts
-# wg-quick up wg0 +<code> 
 +root@hosta # wg-quick up wg0 
 +root@hostb # wg-quick up wg0 
 +</code>
 ===== Check Status ===== ===== Check Status =====
 **Host A** **Host A**
 <code> <code>
-# wg+root@hosta # wg
 interface: wg0 interface: wg0
   public key: PUBLIC-KEY-A   public key: PUBLIC-KEY-A
Line 82: Line 83:
 **Host B** **Host B**
 <code> <code>
-# wg+root@hostb # wg
 interface: wg0 interface: wg0
   public key: PUBLIC-KEY-B   public key: PUBLIC-KEY-B
Line 95: Line 96:
   persistent keepalive: every 25 seconds   persistent keepalive: every 25 seconds
 </code> </code>
 +{{tag>kb linux}}
wireguard.1614062617.txt.gz · Last modified: 2021/02/23 07:43 by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki