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)
Depends on:
Reported: 2021-02-01 10:52 UTC by Balaev PA
Modified: 2021-02-15 20:52 UTC (History)
5 users (show)

See Also:

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 allowed-ips alias Bob
# ifconfig wg0 peer public-key \
        d+TSNnberdVGGWFfMuGYOD06dwjk8c6o541u/dBr+Cc= endpoint allowed-ips alias Alice
# ifconfig wg0 peer public-key \
        d+TSNnberdVGGWFfMuGYOD06dwjk8c6o543u/dBr+Cc= endpoint allowed-ips

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

# ifconfig wg0 peer-list
PublicKey = d+TSNnberdVGGWFfMuGYOD06dwjk8c6o543u/dBr+Cc=
Endpoint =
AllowedIPs =
Alias = Alice
PublicKey = d+TSNnberdVGGWFfMuGYOD06dwjk8c6o541u/dBr+Cc=
Endpoint =
AllowedIPs =
Alias = Bob
PublicKey = d+tsnnberdvggwffmugyod06dwjk8c6o542u/dbr+cc=
Endpoint =
AllowedIPs =
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).