All of lore.kernel.org
 help / color / mirror / Atom feed
* wg-quick (script snippets) for OpenWRT/LEDE
@ 2018-04-03 15:19 vtol
  2018-04-03 15:25 ` Aw: " vtol
  2018-04-09  3:05 ` Yousong Zhou
  0 siblings, 2 replies; 5+ messages in thread
From: vtol @ 2018-04-03 15:19 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/html, Size: 1304 bytes --]

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

* Aw: wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
@ 2018-04-03 15:25 ` vtol
  2018-04-09  3:05 ` Yousong Zhou
  1 sibling, 0 replies; 5+ messages in thread
From: vtol @ 2018-04-03 15:25 UTC (permalink / raw)
  To: wireguard

remailing in plain text 

Hi,

it appears that wg-quick is not provided for OpenWRT/LEDE.

The reason is not really clear to me. As far I understand wg-quick depends on BASH whilst the default shell in OpenWRT/LEDE is ASH.
This however can be easily remidied by installing the BASH package from the OpenWRT/LEDE repo.

OpenWRT/LEDE is utilising netifd for network configuration which is lacking th3 versatility of wg-quick with there script snippets

PRE_UP=( )
POST_UP=( )
PRE_DOWN=( )
POST_DOWN=( )

Is there a way to get those script snippets working in OpenWRT/LEDE as such is required in dynamic/split/kill-switch routing scenarios.

OpenVPN provides a similar script functionality which is however not stripped on the OpenWRT/LEDE repo, respectively it does not require an extra tool package. I find it rather curious that the aforementioned script snippets are not part of wg but rather implemented in wg-quick which then is absent from OpenWRT/LEDE.

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

* Re: wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
  2018-04-03 15:25 ` Aw: " vtol
@ 2018-04-09  3:05 ` Yousong Zhou
  1 sibling, 0 replies; 5+ messages in thread
From: Yousong Zhou @ 2018-04-09  3:05 UTC (permalink / raw)
  To: vtol; +Cc: WireGuard mailing list

On 3 April 2018 at 23:19,  <vtol@gmx.net> wrote:
> Hi,
>
> it appears that wg-quick is not provided for OpenWRT/LEDE.
>
> The reason is not really clear to me. As far I understand wg-quick depends
> on BASH whilst the default shell in OpenWRT/LEDE is ASH.
> This however can be easily remidied by installing the BASH package from the
> OpenWRT/LEDE repo.
>
> OpenWRT/LEDE is utilising netifd for network configuration which is lacking
> th3 versatility of wg-quick with there script snippets
>
> PRE_UP=( )
> POST_UP=( )
> PRE_DOWN=( )
> POST_DOWN=( )
>

POST_UP and POST_DOWN is possible with hotplug scripts in OpenWrt, but
the PRE_xx callback is currently not possible.  As a temporary
workaround, you can try patching locally /lib/netifd/proto/wg.sh to
achieve similar effects, or wrapping wg command with a script (hacky
wacky way)

> Is there a way to get those script snippets working in OpenWRT/LEDE as such
> is required in dynamic/split/kill-switch routing scenarios.
>

Just try installing all those dependencies wg-quick requires, though
after you know enough details about the wg-quick script, you may well
just write your own stripped down version for your own needs.

> OpenVPN provides a similar script functionality which is however not
> stripped on the OpenWRT/LEDE repo, respectively it does not require an extra
> tool package. I find it rather curious that the aforementioned script
> snippets are not part of wg but rather implemented in wg-quick which then is
> absent from OpenWRT/LEDE.
>

OpenVPN and WireGuard is different in this regard.  OpenVPN has a
daemon running while WireGuard depends on the network manager to do
the maintenance things.

                yousong

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

* Re: wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 16:33 Aw: " vtol
  2018-04-08 20:45 ` ѽ҉ᶬḳ℠
@ 2018-04-13 22:34 ` Jason A. Donenfeld
  1 sibling, 0 replies; 5+ messages in thread
From: Jason A. Donenfeld @ 2018-04-13 22:34 UTC (permalink / raw)
  To: vtol; +Cc: WireGuard mailing list

Hello vtol,

OpenWRT has its own robust configuration system, which can do nice
things like avoid circular routing. For that reason, the set of tricks
that wg-quick uses are best avoided on those types of fully-managed
systems. That's why it's not included in the package. Perhaps it
should be, though, for people who would prefer to use quick ad-hoc
VPNs? Have you tried running it with any success?

As mentioned here, you may be able to replace some of the UP/DOWN
hooks with hotplug scripts, or possibly other hooks that are part of
the OpenWRT system. If nobody pipes up here, you might want to ask a
generic question on the OpenWRT list about generally how to execute
scripts on events in relation to network interfaces.

Jason

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

* wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 16:33 Aw: " vtol
@ 2018-04-08 20:45 ` ѽ҉ᶬḳ℠
  2018-04-13 22:34 ` Jason A. Donenfeld
  1 sibling, 0 replies; 5+ messages in thread
From: ѽ҉ᶬḳ℠ @ 2018-04-08 20:45 UTC (permalink / raw)
  To: wireguard

Since I was explicitly directed to this mailing list I has hoped for=20
some input from the developers or perhaps other users of WG. Thus I am=20
bit at a loss at the scarcity of a response.

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

end of thread, other threads:[~2018-04-13 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
2018-04-03 15:25 ` Aw: " vtol
2018-04-09  3:05 ` Yousong Zhou
2018-04-03 16:33 Aw: " vtol
2018-04-08 20:45 ` ѽ҉ᶬḳ℠
2018-04-13 22:34 ` Jason A. Donenfeld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.