WireGuard Archive on lore.kernel.org
 help / 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, back to index

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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox