summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2020-11-27 14:04:49 +0000
committersthen <sthen@openbsd.org>2020-11-27 14:04:49 +0000
commit27830fd89c00b3e89c7b5735526488927fa9bc60 (patch)
tree3d80e1b860f04bc3c41fb735b6240320a60382ad
parentSet the correct IPL for `pageqlock' now that it is grabbed from interrupt. (diff)
downloadwireguard-openbsd-27830fd89c00b3e89c7b5735526488927fa9bc60.tar.xz
wireguard-openbsd-27830fd89c00b3e89c7b5735526488927fa9bc60.zip
wg(4): add comments for the shell script in EXAMPLES, feedback jmc@
-rw-r--r--share/man/man4/wg.46
1 files changed, 4 insertions, 2 deletions
diff --git a/share/man/man4/wg.4 b/share/man/man4/wg.4
index 5147e5ea098..a591312698c 100644
--- a/share/man/man4/wg.4
+++ b/share/man/man4/wg.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wg.4,v 1.6 2020/11/24 16:33:05 sthen Exp $
+.\" $OpenBSD: wg.4,v 1.7 2020/11/27 14:04:49 sthen Exp $
.\" Copyright (c) 2020 Matt Dunwoodie <ncon@noconroy.net>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -13,7 +13,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 24 2020 $
+.Dd $Mdocdate: November 27 2020 $
.Dt WG 4
.Os
.Sh NAME
@@ -138,9 +138,11 @@ but demonstrates two interfaces on the same machine:
.Bd -literal
#!/bin/sh
+# create interfaces; set random private keys
ifconfig wg1 create wgport 7111 wgkey `openssl rand -base64 32` rdomain 1
ifconfig wg2 create wgport 7222 wgkey `openssl rand -base64 32` rdomain 2
+# retrieve the public keys associated with the private keys
PUB1="`ifconfig wg1 | grep 'wgpubkey' | cut -d ' ' -f 2`"
PUB2="`ifconfig wg2 | grep 'wgpubkey' | cut -d ' ' -f 2`"