Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Anonymous Anonymous <admin@hda.me>
To: <wireguard@lists.zx2c4.com>, "Jason" <jason@zx2c4.com>
Subject: Re: [TOOL] wg-config graduates to src/tools, becomes wg-auto-config
Date: Mon, 02 Jan 2017 07:48:18 +0100	[thread overview]
Message-ID: <1595def90e0.ed2b40b2254.2112025199632738072@hda.me> (raw)
In-Reply-To: 

Nicely done! Common sense won after all.
>Notice the two =E2=80=98Address=E2=80=99 lines at the top, and that =E2=80=
=98SaveConfig=E2=80=99 is set to =E2=80=98true=E2=80=99, indicating that th=
e configuration file should be saved on shutdown using the current status o=
f the interface.
On Sun, Jan 1, 2017, at 22:57, Jason A. Donenfeld wrote:
> Hi guys,
>=20
> The re-written `wg-auto-config` script is now a part of src/tools and
> adds a few configuration variables to the configuration file format,
> to make it really easy to define VPNs with a single file. This has
> been requested by many of you, and here is, at long last, a basic
> solution.
>=20
> It's a simple bash script. It gets installed by `make install` in the
> src/tools directory, but I realize that not all distributions want
> this. For example, both NixOS and OpenWRT already have WireGuard built
> into their network management utilities, and OpenWRT doesn't even ship
> bash. So for these distributions, where it is useless, I expect for
> them to install with `WITH_WGAUTOCONFIG=3Dno make -C src/tools install`,
> in order to not install it. As WireGuard gets integrated into other
> network management utilities, such as systemd-networkd, I expect for
> this script to fade in usefulness and eventually be removed all
> together. But for now, it's quite helpful and will be useful to some
> users.
>=20
> So what is this tool? Here's the man page:
> https://git.zx2c4.com/WireGuard/about/src/tools/wg-auto-config.8
>=20
> And here's an example:
>=20
> [Interface]
> Address =3D 10.200.100.8/24
> PostUp =3D echo =E2=80=99nameserver 10.200.100.1=E2=80=99 | cmd resolvcon=
f -a $INTERFACE -m
> 0
> PostDown =3D cmd resolvconf -d $INTERFACE
> PrivateKey =3D oK56DE9Ue9zK76rAc8pBl6opph+1v36lm7cXXsQKrQM=3D
> PresharedKey =3D /UwcSPg38hW/D9Y3tcS1FOV0K1wuURMbS0sesJEP5ak=3D
>=20
> [Peer]
> PublicKey =3D GtL7fZc/bLnqZldpVofMCD6hDjrK28SsdLxevJ+qtKU=3D
> AllowedIPs =3D 0.0.0.0/0
> Endpoint =3D demo.wireguard.io:51820
>=20
> This is a normal wg(8) format, except with the addition of the
> "Address" line and the "PostUp" and "PostDown" lines. You give this to
> wg-auto-config, and everything, including routing, is taken care of
> for you. For example, save this in /etc/wireguard/wgdemo0.conf and
> then run:
>=20
> $ wg-auto-config up wgdemo0
>=20
> And voila, your VPN is running.
>=20
> Check out the man page, read the script --
> https://git.zx2c4.com/WireGuard/tree/src/tools/wg-auto-config -- and
> please let me know what you think before I cut the next snapshot.
>=20
> Regards,
> Jason
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard

             reply	other threads:[~2017-01-02  6:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02  6:48 Anonymous Anonymous [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-03  6:57 Jason A. Donenfeld
2017-01-03 21:10 ` Jason A. Donenfeld
2017-01-04 19:21   ` Jason A. Donenfeld
2017-01-02  4:57 Jason A. Donenfeld
2017-01-02 14:49 ` Jason A. Donenfeld
2017-01-02 15:17 ` Jason A. Donenfeld
2017-01-03  6:46   ` Daniel Kahn Gillmor

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=1595def90e0.ed2b40b2254.2112025199632738072@hda.me \
    --to=admin@hda.me \
    --cc=jason@zx2c4.com \
    --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).