User Tools

Site Tools


documentation:examples:gre_ipsec_and_openvpn

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
Last revisionBoth sides next revision
documentation:examples:gre_ipsec_and_openvpn [2022/10/29 01:27] – [Testing] olivierdocumentation:examples:gre_ipsec_and_openvpn [2023/07/10 12:40] – [Router 2] 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/8nrET4GQKijrjWFKiux9iNLv04= PublicKey = o267Qf43WlVTawLq/8nrET4GQKijrjWFKiux9iNLv04=
-AllowedIPs = 10.0.45.0/24,2001:db8:45::2/64+AllowedIPs = 10.0.45.0/24,2001:db8:45::/64
 Endpoint = 10.0.34.4:51820 Endpoint = 10.0.34.4:51820
 EOF EOF
  
-sysrc kld_list="if_wg" 
 sysrc wireguard_interfaces=wg0 sysrc wireguard_interfaces=wg0
-kldload if_wg 
 service wireguard enable service wireguard enable
 service wireguard start service wireguard start
Line 1379: Line 1378:
 EOF EOF
  
-sysrc kld_list="if_wg" 
 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 received, 0.0% packet loss 2 packets transmitted, 2 packets received, 0.0% packet loss
 round-trip min/avg/max/std-dev = 0.764/1.272/1.779/0.507 ms round-trip min/avg/max/std-dev = 0.764/1.272/1.779/0.507 ms
 +</code>
 +
 +Are we using the kernel module?
 +<code>
 +root@VM2:~ # kldstat -v -n if_wg.ko
 +Id Refs Address                Size Name
 +    1 0xffffffff82b17000    2e550 if_wg.ko (/boot/kernel/if_wg.ko)
 +        Contains modules:
 +                 Id Name
 +                473 wg
 </code> </code>
  
Line 1417: Line 1424:
         groups: wg         groups: wg
         nd6 options=101<PERFORMNUD,NO_DAD>         nd6 options=101<PERFORMNUD,NO_DAD>
-root@VM2:~ # netstat -rn4 +root@VM2:~ # netstat -rn | grep "Dest\|wg0"
-Routing tables +
- +
-Internet:+
 Destination        Gateway            Flags     Netif Expire Destination        Gateway            Flags     Netif Expire
-default            10.0.23.3          UGS      vtnet1 
-10.0.12.0/24       link#                   vtnet0 
-10.0.12.2          link#            UHS         lo0 
-10.0.23.0/24       link#                   vtnet1 
-10.0.23.2          link#            UHS         lo0 
 10.0.45.0/24       link#            US          wg0 10.0.45.0/24       link#            US          wg0
-127.0.0.1          link#5             UH          lo0+Destination                       Gateway                       Flags     Netif Expire 
 +2001:db8:45::/64                  link#7                        US          wg0
 root@VM2:~ # wg show root@VM2:~ # wg show
 interface: wg0 interface: wg0
documentation/examples/gre_ipsec_and_openvpn.txt · Last modified: 2023/07/10 12:40 by olivier

Except where otherwise noted, content on this wiki is licensed under the following license: BSD 2-Clause
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki