wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* wg-quick: Read private key from file?
@ 2018-12-27 16:51 Rene 'Renne' Bartsch, B.Sc. Informatics
  2018-12-27 17:11 ` Lonnie Abelbeck
  2018-12-27 18:58 ` Samuel Holland
  0 siblings, 2 replies; 3+ messages in thread
From: Rene 'Renne' Bartsch, B.Sc. Informatics @ 2018-12-27 16:51 UTC (permalink / raw)
  To: wireguard

Hi,

does wg-quick allow to read the private key from a file instead of a .conf-file?

Regards,

Renne
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wg-quick: Read private key from file?
  2018-12-27 16:51 wg-quick: Read private key from file? Rene 'Renne' Bartsch, B.Sc. Informatics
@ 2018-12-27 17:11 ` Lonnie Abelbeck
  2018-12-27 18:58 ` Samuel Holland
  1 sibling, 0 replies; 3+ messages in thread
From: Lonnie Abelbeck @ 2018-12-27 17:11 UTC (permalink / raw)
  To: Rene 'Renne' Bartsch, B.Sc. Informatics; +Cc: WireGuard mailing list



> On Dec 27, 2018, at 10:51 AM, Rene 'Renne' Bartsch, B.Sc. Informatics <ml@bartschnet.de> wrote:
> 
> Hi,
> 
> does wg-quick allow to read the private key from a file instead of a .conf-file?
> 
> Regards,
> 
> Renne

You could create a wg-quick-wrapper script that aggregates files from where-ever you like before it calls wg-quick and then cleans-up tmp files.

Or just re-write wg-quick to suit your needs.

Lonnie

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wg-quick: Read private key from file?
  2018-12-27 16:51 wg-quick: Read private key from file? Rene 'Renne' Bartsch, B.Sc. Informatics
  2018-12-27 17:11 ` Lonnie Abelbeck
@ 2018-12-27 18:58 ` Samuel Holland
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Holland @ 2018-12-27 18:58 UTC (permalink / raw)
  To: Rene 'Renne' Bartsch, B.Sc. Informatics, wireguard

On 12/27/18 10:51, Rene 'Renne' Bartsch, B.Sc. Informatics wrote:
> does wg-quick allow to read the private key from a file instead of a .conf-file?

Yes, and the manual page wg-quick(8) even has an example of how to read the
private key from an external source:

    Or, perhaps it is desirable to store private keys in encrypted form, such
    as through use of pass(1):

        PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i)

If you want to use a file, just provide the filename, as in:

    PostUp = wg set %i private-key /etc/wireguard/wg0.key

From the wg(8) manual page:

    Both private-key and preshared-key must be a files, because command line
    arguments are not considered private on most systems; but if you are using
    bash(1), you may safely pass in a string by specifying as private-key or
    preshared-key the expression:  <(echo PRIVATEKEYSTRING).

There's no need to write additional wrapper scripts or anything like that.

If you weren't aware of those two manual pages, I suggest reading through both.
It will answer most of your questions :)

Hope that helps,
Samuel
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-27 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 16:51 wg-quick: Read private key from file? Rene 'Renne' Bartsch, B.Sc. Informatics
2018-12-27 17:11 ` Lonnie Abelbeck
2018-12-27 18:58 ` Samuel Holland

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).