Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
To: Roman Mamedov <rm.wg@romanrm.net>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Include directive to support "conf.d/*" and the like
Date: Fri, 16 Mar 2018 09:27:19 +0100	[thread overview]
Message-ID: <CAKXLc7eHSYh0oUBA+5U0LeyBDytAPfGvveHkhV4XbNy7c_C48g@mail.gmail.com> (raw)
In-Reply-To: <20180316130222.3a9d0611@natsu>

On Fri, Mar 16, 2018 at 9:02 AM, Roman Mamedov <rm.wg@romanrm.net> wrote:
> I would like to be able to split the [Interface] and [Peer] parts of the config
> file into separate files. The reason is that currently I manage configurations
> of my various hosts at a central location, then push out common configs to all
> hosts.
>
BTW, this is the default in Gentoo at the moment... e.g.
# fgrep wg49 /etc/conf.d/net
/etc/conf.d/net:config_wg49="10.1.8.1/16"
/etc/conf.d/net:wireguard_wg49="/etc/wireguard/wg49.conf"

... and I often hate it :-)
In a way it is in a way "include", basically IP address and additional
routing is configured as with any other interface, but WG specific
part (ListenPort,PrivateKey,PublicKey,AllowedIPs,Endpoint) in another,
_interface_specific_ file...

This currently seems to make impossible to use standard
`/etc/init.d/net.wg?? start|stop` mechanism along `wg-quick` commands
(e.g. Address cannot be specified in "/etc/wireguard/wg49.conf").

There was somewhat related discussion few months ago about the
difference between configuration and state (`running config` as Cisco
names it) and them being somewhat mixed.

I guess this part may need reworking, but that should involve at least
a few distributions with a few subsystems (e.g. initrc and systemd
alonng wg-quick) that may be incompatible, so it is a hard task.

Cheers,
Kalin.

  reply	other threads:[~2018-03-16  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16  8:02 Roman Mamedov
2018-03-16  8:27 ` Kalin KOZHUHAROV [this message]
2018-03-16 10:59 ` Daniel Kahn Gillmor
2018-04-14  1:47   ` Jason A. Donenfeld
2018-04-14  8:47     ` Roman Mamedov

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=CAKXLc7eHSYh0oUBA+5U0LeyBDytAPfGvveHkhV4XbNy7c_C48g@mail.gmail.com \
    --to=me.kalin@gmail.com \
    --cc=rm.wg@romanrm.net \
    --cc=wireguard@lists.zx2c4.com \
    /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).