Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Feb 2021 10:52:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253154] [PATCH] wireguard - add peer alias
Message-ID:  <bug-253154-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253154

            Bug ID: 253154
           Summary: [PATCH] wireguard - add peer alias
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: mail@void.so

Created attachment 222065
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=222065&action=edit
alias name

When you have many peers, it becomes difficult to understand who is who. You
can only write in notepad lines such as: "pub-key -> Alice" or via comment in
wireguard config file. But FreeBSD doesn't have it either. So I added optional
alias parameter to ifconfig. Example:

# ifconfig wg0 peer public-key \
        d+tsnnberdvggwffmugyod06dwjk8c6o542u/dbr+cc= endpoint
192.168.1.86:51820 allowed-ips 10.0.0.3/32 alias Bob
# ifconfig wg0 peer public-key \
        d+TSNnberdVGGWFfMuGYOD06dwjk8c6o541u/dBr+Cc= endpoint
192.168.1.86:51820 allowed-ips 10.0.0.4/32 alias Alice
# ifconfig wg0 peer public-key \
        d+TSNnberdVGGWFfMuGYOD06dwjk8c6o543u/dBr+Cc= endpoint
192.168.1.86:51820 allowed-ips 10.0.0.5/32

And peer list becomes more pretty to understand who is who:

# ifconfig wg0 peer-list
[Peer]
PublicKey = d+TSNnberdVGGWFfMuGYOD06dwjk8c6o543u/dBr+Cc=
Endpoint = 192.168.1.86:51820
AllowedIPs = 10.0.0.5/32
[Peer]
Alias = Alice
PublicKey = d+TSNnberdVGGWFfMuGYOD06dwjk8c6o541u/dBr+Cc=
Endpoint = 192.168.1.86:51820
AllowedIPs = 10.0.0.4/32
[Peer]
Alias = Bob
PublicKey = d+tsnnberdvggwffmugyod06dwjk8c6o542u/dbr+cc=
Endpoint = 192.168.1.86:51820
AllowedIPs = 10.0.0.3/32

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253154-227>