documentation:examples:gre_ipsec_and_openvpn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
documentation:examples:gre_ipsec_and_openvpn [2020/01/13 14:08] – [VPN with GRE, GIF, IPSec and OpenVPN] olivier | documentation:examples:gre_ipsec_and_openvpn [2020/01/13 14:16] – [Testing] olivier | ||
---|---|---|---|
Line 1161: | Line 1161: | ||
16: | 16: | ||
</ | </ | ||
+ | |||
+ | ===== Wireguard ===== | ||
+ | |||
+ | ==== Key pairs generation ==== | ||
+ | |||
+ | The first step is to generate a couple of private and public keys on each wireguard endpoint. | ||
+ | |||
+ | On VM2 and on VM4, generate the keys: | ||
+ | |||
+ | < | ||
+ | cd / | ||
+ | wg genkey > private | ||
+ | chmod 600 private | ||
+ | wg pubkey < private > public | ||
+ | </ | ||
+ | |||
+ | ==== Router 2 ==== | ||
+ | |||
+ | Display router 2 private key, and router 4 public key. | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | [Interface] | ||
+ | PrivateKey = 8Og1cCmvirK+zcGus/ | ||
+ | ListenPort = 51820 | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = FSvVqj2s1FZqsSIvPLrE1RRTgbaPLbfG87P36F21M1g= | ||
+ | AllowedIPs = 10.0.45.0/ | ||
+ | Endpoint = 10.0.34.4: | ||
+ | EOF | ||
+ | |||
+ | sysrc wireguard_interfaces=wg0 | ||
+ | service wireguard enable | ||
+ | service wireguard start | ||
+ | </ | ||
+ | |||
+ | ==== Router 4 ==== | ||
+ | |||
+ | Display router 4 private key, and router 2 public key. | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | [Interface] | ||
+ | PrivateKey = ADfm6+sXZnoyDAkG/ | ||
+ | ListenPort = 51820 | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = gaQij176wrz3g+2RTJ/ | ||
+ | AllowedIPs = 10.0.12.0/ | ||
+ | Endpoint = 10.0.23.2: | ||
+ | EOF | ||
+ | |||
+ | sysrc wireguard_interfaces=wg0 | ||
+ | service wireguard enable | ||
+ | service wireguard start | ||
+ | </ | ||
+ | |||
+ | ==== Testing ==== | ||
+ | |||
+ | Pinging VM5 from VM1: |
documentation/examples/gre_ipsec_and_openvpn.txt · Last modified: 2023/07/10 12:40 by olivier