wg-quick add_route

Jason A. Donenfeld Jason at zx2c4.com
Fri Oct 27 21:48:01 CEST 2017


Hey Lucian,

If you're using WireGuard for real purposes and not just for a quick
"turn it on turn it off" situation with a remote endpoint, then
wg-quick probably isn't the right tool for you. Instead, I think
you'll be better off just calling wg(8) and ip(8) normally.

The usage of WireGuard in general is supposed to be trivial enough
that you can script this without too much fuss. After all, wg-quick
itself is just a silly little bash script trivially wrapping some
common functionality.

I think if we go down the road of adding a nob for every possible
configuration, you'll wind up having to spend time learning about
which nobs map to which sequence of commands, which will be more
complex than just doing it yourself.

So, I think probably I wouldn't accept such a patch, and you'd be
better off just scripting 4 lines yourself:

ip link add wg0 type wireguard
wg setconf wg0 path/to/conf.conf
ip addr add 10.0.0.1/24 dev wg0
ip link set wg0 up

Especially if you're using rip+eigrp, you already know what you're
doing, and this shouldn't be too difficult for you.

I'm happy to bikeshed this if you'd like; other opinions are always
interesting. But my initial instinct is that needless complexity is
needless.

Jason


More information about the WireGuard mailing list