summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2020-11-27 14:04:50 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2020-11-27 14:04:50 +0000
commite94b1d33d84b14dcb291b49218be26f6cdab8347 (patch)
treee2c5f92ee36f833154112023d2c4ade90448a4cb /share/man
parentc255e08f4b6d892a985a9f899794a0b50341871f (diff)
wg(4): add comments for the shell script in EXAMPLES, feedback jmc@
Diffstat (limited to 'share/man')
-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`"