wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* wg-quick: Separate files for interface and peer definitions?
@ 2018-12-27 16:19 Rene 'Renne' Bartsch, B.Sc. Informatics
  2018-12-27 19:06 ` Samuel Holland
  0 siblings, 1 reply; 2+ messages in thread
From: Rene 'Renne' Bartsch, B.Sc. Informatics @ 2018-12-27 16:19 UTC (permalink / raw)
  To: wireguard

Hi,

we want to distribute the same file with peer definitions to all Wireguard peers.

Is there any way in wg-quick to use one configuration file for the interface definition and another file for the definition of peers?


Regards,

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

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

* Re: wg-quick: Separate files for interface and peer definitions?
  2018-12-27 16:19 wg-quick: Separate files for interface and peer definitions? Rene 'Renne' Bartsch, B.Sc. Informatics
@ 2018-12-27 19:06 ` Samuel Holland
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Holland @ 2018-12-27 19:06 UTC (permalink / raw)
  To: Rene 'Renne' Bartsch, B.Sc. Informatics, wireguard

On 12/27/18 10:19, Rene 'Renne' Bartsch, B.Sc. Informatics wrote:
> we want to distribute the same file with peer definitions to all Wireguard 
> peers.
> 
> Is there any way in wg-quick to use one configuration file for the interface 
> definition and another file for the definition of peers?

In a way, yes. You can call `wg addconf` from a wg-quick PostUp hook to include
another configuration file containing only peers. However, the recommended way
of doing this if you are using a configuration management system
(puppet/ansible/salt/etc.) is to use a template that will concatenate the
interface configuration and peer definitions into one file.

Note that WireGuard will ignore a peer whose public key matches the interface's
private key. So you can distribute a single list of peers everywhere. Only the
[Interface] section needs to be customized per machine.

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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 16:19 wg-quick: Separate files for interface and peer definitions? Rene 'Renne' Bartsch, B.Sc. Informatics
2018-12-27 19:06 ` 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).