documentation:examples:gre_ipsec_and_openvpn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:examples:gre_ipsec_and_openvpn [2022/10/29 01:12] – [Router 4] olivier | documentation:examples:gre_ipsec_and_openvpn [2023/07/10 12:40] (current) – [Router 4] olivier | ||
---|---|---|---|
Line 1322: | Line 1322: | ||
===== Wireguard ===== | ===== Wireguard ===== | ||
+ | On current (14.0) needs only wireguard-tools (kernel module included), on older (12 or 13) needs wireguard-kmod. | ||
==== Key pairs generation on VM2 and VM4 ==== | ==== Key pairs generation on VM2 and VM4 ==== | ||
Line 1350: | Line 1351: | ||
[Peer] | [Peer] | ||
PublicKey = o267Qf43WlVTawLq/ | PublicKey = o267Qf43WlVTawLq/ | ||
- | AllowedIPs = 10.0.45.0/ | + | AllowedIPs = 10.0.45.0/ |
Endpoint = 10.0.34.4: | Endpoint = 10.0.34.4: | ||
EOF | EOF | ||
- | sysrc kld_list=" | ||
sysrc wireguard_interfaces=wg0 | sysrc wireguard_interfaces=wg0 | ||
- | kldload if_wg | ||
service wireguard enable | service wireguard enable | ||
service wireguard start | service wireguard start | ||
Line 1375: | Line 1374: | ||
[Peer] | [Peer] | ||
PublicKey = z9wBhxr/ | PublicKey = z9wBhxr/ | ||
- | AllowedIPs = 10.0.12.0/ | + | AllowedIPs = 10.0.12.0/ |
Endpoint = 10.0.23.2: | Endpoint = 10.0.23.2: | ||
EOF | EOF | ||
- | sysrc kld_list=" | ||
sysrc wireguard_interfaces=wg0 | sysrc wireguard_interfaces=wg0 | ||
- | kldload if_wg | ||
service wireguard enable | service wireguard enable | ||
service wireguard start | service wireguard start | ||
Line 1408: | Line 1405: | ||
2 packets transmitted, | 2 packets transmitted, | ||
round-trip min/ | round-trip min/ | ||
+ | </ | ||
+ | |||
+ | Are we using the kernel module? | ||
+ | < | ||
+ | root@VM2:~ # kldstat -v -n if_wg.ko | ||
+ | Id Refs Address | ||
+ | | ||
+ | Contains modules: | ||
+ | Id Name | ||
+ | 473 wg | ||
+ | </ | ||
+ | |||
+ | Displaying wg status on VM2: | ||
+ | < | ||
+ | root@VM2:~ # ifconfig wg0 | ||
+ | wg0: flags=80c1< | ||
+ | options=80000< | ||
+ | groups: wg | ||
+ | nd6 options=101< | ||
+ | root@VM2:~ # netstat -rn | grep " | ||
+ | Destination | ||
+ | 10.0.45.0/ | ||
+ | Destination | ||
+ | 2001: | ||
+ | root@VM2:~ # wg show | ||
+ | interface: wg0 | ||
+ | public key: z9wBhxr/ | ||
+ | private key: (hidden) | ||
+ | listening port: 51820 | ||
+ | |||
+ | peer: o267Qf43WlVTawLq/ | ||
+ | endpoint: 10.0.34.4: | ||
+ | allowed ips: 2001: | ||
+ | latest handshake: 32 seconds ago | ||
+ | transfer: 356 B received, 436 B sent | ||
</ | </ |
documentation/examples/gre_ipsec_and_openvpn.1666998727.txt.gz · Last modified: 2022/10/29 01:12 by olivier