[Bug 253154] [PATCH] wireguard - add peer alias

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 1 10:52:27 UTC 2021


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 at FreeBSD.org
          Reporter: mail at 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.


More information about the freebsd-bugs mailing list