Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Barry <barry@barrys-emacs.org>
To: Sukhbir Singh <yamailinglist@riseup.net>
Cc: wireguard@lists.zx2c4.com
Subject: Re: Adding comments for a peer through wg set
Date: Tue, 17 Mar 2020 18:18:12 +0000	[thread overview]
Message-ID: <CB283B6E-6429-4212-B23A-60CF8AFC10CD@barrys-emacs.org> (raw)
In-Reply-To: <20200317015201.GA384449@riseup.net>



> On 17 Mar 2020, at 17:28, Sukhbir Singh <yamailinglist@riseup.net> wrote:
> 
> Hi,
> 
> When adding a new peer through `wg set', it seems like there is no way
> to include comments in the parameters. To solve this, the hack I use
> involves making sure SaveConfig is set in wg0.conf, adding the peer,
> `wg-quick save' and then appending the desired comment to the end of the
> wg0.conf file. This helps me add the peer without taking down the tunnel
> and also saves it to the config.
> 
> Is there a better way? Note that I tried adding the comments to the
> different parameters (using "#") but it didn't work as expected.
> 
> What's the reason for adding comments? So as to keep some notes about
> the peer I added, like "[Peer] ... # laptop config". So if there is a
> better solution for key management, please do share.

My solution to this problem is to maintain my own files and generate
the server wg0.conf from them. I also generate the clients wg0.conf
from the same data. I manage the allocation of IP addresses automatically.

Then the things that you are using comments for can be key/value
pairs in thoses files. For example I have a friendly name for each peer.

Barry






> 
> Thanks.
> 
> -- 
> Sukhbir
> 


      reply	other threads:[~2020-03-30  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  1:52 Sukhbir Singh
2020-03-17 18:18 ` Barry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB283B6E-6429-4212-B23A-60CF8AFC10CD@barrys-emacs.org \
    --to=barry@barrys-emacs.org \
    --cc=wireguard@lists.zx2c4.com \
    --cc=yamailinglist@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).