wireguard
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wireguard [2021/02/23 07:44] – [Assign Link Network to Wireguard-Tunnel] baumi | wireguard [2021/05/09 10:31] (current) – [Assign Link Network to Wireguard-Tunnel] baumi | ||
---|---|---|---|
Line 13: | Line 13: | ||
**Host A** | **Host A** | ||
< | < | ||
- | root@hosta# wg genkey > privateA | + | root@hosta # wg genkey > privateA |
- | root@hosta# wg pubkey < privateA > publicA | + | root@hosta # wg pubkey < privateA > publicA |
</ | </ | ||
**Host B** | **Host B** | ||
< | < | ||
- | root@hostb# wg genkey > privateB | + | root@hostb # wg genkey > privateB |
- | root@hostb# wg pubkey < privateB > publicB | + | root@hostb # wg pubkey < privateB > publicB |
</ | </ | ||
- | {{tag>kb linux}} | ||
===== Assign Link Network to Wireguard-Tunnel ===== | ===== Assign Link Network to Wireguard-Tunnel ===== | ||
- | Link-Network: | + | |
- | HostA: 172.24.0.1/ | + | HostA: 172.24.0.1/ |
- | HostB: 172.24.0.2/ | + | HostB: 172.24.0.2/ |
===== Create Config ===== | ===== Create Config ===== | ||
**Host A** | **Host A** | ||
< | < | ||
- | # cat / | + | root@hosta |
# HostA - HostB | # HostA - HostB | ||
[Interface] | [Interface] | ||
Line 46: | Line 45: | ||
**Host B** | **Host B** | ||
< | < | ||
- | # cat / | + | root@hostb |
# 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 | + | < |
+ | root@hosta # wg-quick up wg0 | ||
+ | root@hostb | ||
+ | </ | ||
===== Check Status ===== | ===== Check Status ===== | ||
**Host A** | **Host A** | ||
< | < | ||
- | # wg | + | root@hosta |
interface: wg0 | interface: wg0 | ||
public key: PUBLIC-KEY-A | public key: PUBLIC-KEY-A | ||
Line 82: | Line 83: | ||
**Host B** | **Host B** | ||
< | < | ||
- | # wg | + | root@hostb |
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 | ||
</ | </ | ||
+ | {{tag>kb linux}} |
wireguard.1614062670.txt.gz · Last modified: 2021/02/23 07:44 by baumi