Bug 253154 - wireguard - add peer alias
Summary: wireguard - add peer alias
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 10:52 UTC by Balaev PA
Modified: 2021-02-15 20:52 UTC (History)
5 users (show)

See Also:


Attachments
alias name (3.56 KB, patch)
2021-02-01 10:52 UTC, Balaev PA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balaev PA 2021-02-01 10:52:27 UTC
Created attachment 222065 [details]
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
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2021-02-01 17:01:17 UTC
^Triage: assign to net@.

Also, note that we have deprecated using [patch] and the 'patch' Keyword in favor of deriving that information from the Bugzilla metadata (e.g. from the Attachments themselves).