From 6bdfcd429f6e0c98d3ff617cffc6d030ec71f660 Mon Sep 17 00:00:00 2001 From: Artem Glazychev Date: Mon, 28 Sep 2020 16:57:26 +0700 Subject: wireguard: readme fix Type: fix Signed-off-by: Artem Glazychev Change-Id: I0080a158fc3e17dfdd360f6ba164e3bfa3d585a6 --- src/plugins/wireguard/README.md | 53 +++++++++++++---------------------------- 1 file changed, 17 insertions(+), 36 deletions(-) (limited to 'src/plugins/wireguard/README.md') diff --git a/src/plugins/wireguard/README.md b/src/plugins/wireguard/README.md index a11356cfde2..48e45eb7760 100755 --- a/src/plugins/wireguard/README.md +++ b/src/plugins/wireguard/README.md @@ -2,7 +2,7 @@ ## Overview This plugin is an implementation of [wireguard protocol](https://www.wireguard.com/) for VPP. It allows one to create secure VPN tunnels. -This implementation is based on [wireguard-openbsd](https://git.zx2c4.com/wireguard-openbsd/), using the implementaiton of *ipip-tunnel*. +This implementation is based on [wireguard-openbsd](https://git.zx2c4.com/wireguard-openbsd/). ## Crypto @@ -16,59 +16,40 @@ OpenSSL: - chachapoly1305 ## Plugin usage example -Usage is very similar to other wireguard implementations. -### Create connection -Create keys: +### Create wireguard interface ``` -> vpp# wg genkey -> *my_private_key* -> vpp# wg pubkey -> *my_pub_key* +> vpp# wireguard create listen-port private-key src [generate-key] +> *wg_interface* +> vpp# set int state up +> vpp# set int ip address ``` -Create tunnel: +### Add a peer configuration: ``` -> vpp# create ipip tunnel src dst -> *tun_name* -> vpp# set int state up -> vpp# set int ip address +> vpp# wireguard peer add public-key endpoint allowed-ip dst-port persistent-keepalive [keepalive_interval] +> vpp# *peer_idx* ``` -After this we can create wg-device. The UDP port is opened automatically. -``` -> vpp# wg set device private-key src-port -``` - -Now, we can add a peer configuration: -``` -> vpp# wg set peer public-key endpoint allowed-ip dst-port tunnel persistent-keepalive -``` -If you need to add more peers, don't forget to first create another ipip-tunnel. -Ping. -``` -> vpp# ping -``` ### Show config -To show device and all peer configurations: ``` -> vpp# show wg +> vpp# show wireguard interface +> vpp# show wireguard peer ``` ### Remove peer -Peer can be removed by its public-key. ``` -> vpp# wg remove peer +> vpp# wireguard peer remove ``` -This removes the associated ipip tunnel as well -### Clear all connections + +### Delete interface ``` -> vpp# wg remove device +> vpp# wireguard delete ``` -## main next steps for improving this implementation +## Main next steps for improving this implementation 1. Use all benefits of VPP-engine. -2. Add IP6 support (currently only supports IPv4)) +2. Add IPv6 support (currently only supports IPv4) 3. Add DoS protection as in original protocol (using cookie) -- cgit 1.2.3-korg