sysctl of Alpine standard 3.8.1 doesn't support option -r.
Lonnie Abelbeck
lists at lonnie.abelbeck.com
Wed Dec 5 14:59:39 CET 2018
> On Dec 3, 2018, at 1:28 AM, Du Felix <boost.subscribing at gmail.com> wrote:
>
> I use alpine standard 3.8.1, which has kernel 4.14.82-0-vanilla.
> When I start wireguard as client peer with wg-quick up client, It says:
>
> [#] ip link add client type wireguard
> [#] wg setconf client /dev/fd/63
> [#] ip address add 10.0.0.4/24 dev client
> [#] ip link set mtu 1420 dev client
> [#] ip link set client up
> [#] resolvconf -a client -m 0 -x
> [#] wg set client fwmark 51820
> [#] ip -4 route add 0.0.0.0/0 dev client table 51820
> [#] ip -4 rule add not fwmark 51820 table 51820
> [#] ip -4 rule add table main suppress_prefixlength 0
> sysctl: unrecognized option: r
> BusyBox v1.29.3 (2018-11-21 11:45:56 UTC) multi-call binary.
>
> Usage: sysctl -p [-enq] [FILE...] / [-enqaw] [KEY[=VALUE]]...
>
> Show/set kernel parameters
>
> -p Set values from FILEs (default /etc/sysctl.conf)
> -e Don't warn about unknown keys
> -n Don't show key names
> -q Quiet
> -a Show all values
> -w Set values
In your "wg-quick" script, try changing the line:
-- from --
done < <(sysctl -a -r '^net\.ipv4.conf\.[^ .=]+\.rp_filter$')
-- to --
done < <(sysctl -a 2>/dev/null | sed -n -r 's#^(net\.ipv4.conf\.[^ .=]+\.rp_filter).*$#\1#p')
--
Lonnie
More information about the WireGuard
mailing list