wireguard: add events for peer
[vpp.git] / src / plugins / wireguard / README.md
1 # Wireguard vpp-plugin  {#wireguard_plugin_doc}
2
3 ## Overview
4 This plugin is an implementation of [wireguard protocol](https://www.wireguard.com/) for VPP. It allows one to create secure VPN tunnels.
5 This implementation is based on [wireguard-openbsd](https://git.zx2c4.com/wireguard-openbsd/).
6
7 ## Crypto
8
9 The crypto protocols:
10
11 - blake2s [[Source]](https://github.com/BLAKE2/BLAKE2)
12
13 OpenSSL:
14
15 - curve25519
16 - chachapoly1305
17
18 ## Plugin usage example
19
20 ### Create wireguard interface
21
22 ```
23 > vpp# wireguard create listen-port <port> private-key <priv_key> src <src_ip4> [generate-key]
24 > *wg_interface*
25 > vpp# set int state <wg_interface> up
26 > vpp# set int ip address <wg_interface> <wg_ip4>
27 ```
28
29 ### Add a peer configuration:
30 ```
31 > vpp# wireguard peer add <wg_interface> public-key <pub_key_other> endpoint <ip4_dst> allowed-ip <prefix> port <port_dst> persistent-keepalive [keepalive_interval]
32 > vpp# *peer_idx*
33 ```
34
35 ### Add routes for allowed-ip:
36 ```
37 > ip route add <prefix> via <wg_ip4> <wg_interface>
38 ```
39
40 ### Show config
41 ```
42 > vpp# show wireguard interface
43 > vpp# show wireguard peer
44 ```
45
46 ### Remove peer
47 ```
48 > vpp# wireguard peer remove <peer_idx>
49 ```
50
51
52 ### Delete interface 
53 ```
54 > vpp# wireguard delete <wg_interface>
55 ```
56
57 ## Main next steps for improving this implementation
58 1. Use all benefits of VPP-engine.
59 2. Add IPv6 support (currently only supports IPv4)
60 3. Add DoS protection as in original protocol (using cookie)