Received: from mail-yw1-f65.google.com (mail-yw1-f65.google.com [209.85.161.65]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id CCA2E781B6D for <~alpine/users@lists.alpinelinux.org>; Sat, 23 Nov 2019 15:40:08 +0000 (UTC) Received: by mail-yw1-f65.google.com with SMTP id z67so3597214ywb.9 for <~alpine/users@lists.alpinelinux.org>; Sat, 23 Nov 2019 07:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hGYlTL92i+N0Mfp9kOQswcPQLDpbs3TJX1/RUK37t28=; b=bun34UijvxaTUDH91JxQw4qk7VmrPoZmXyuiZYxeuuTC9Lc6V/39h/cA0TFNJL4Q/x kjrSUSF2zr0Bh7b6RVkSCcMSAY0Vhm7IDRgJQE9XFZ/Rzf+2A438jUa87BTqaNiFaY98 T88kWy3FRx2h4GObsz+veC8DsYbOYhCY6gmkmKnRbrfKq2uYVGNi7TFYvzSGW888f7zL oNrHv4mMLOamB7wkbd2kEoQZytXZJUj01bA9MK2Ynhorm2RnS0Q092tCbkLJat0HRu4G k5Ur+6Nt0Pw6CJ4MraNOqVDo60pjDOFwjcIxJuuQzK+PRxmyB/tKLLbW7JjjEZqp6WOr OMDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hGYlTL92i+N0Mfp9kOQswcPQLDpbs3TJX1/RUK37t28=; b=WWnqUIzjA5VTx3oC+zhBB/P8tAniqG7TI8nQA6pn9J2qmetaH/BJK2HmQgLCyqeAAO hCFRTN2EpEOXIaJHXHz5L/rBF4itgY8YnKYTlGJGjmdMR7qdrAPpZTSOIqTu5P+wQQdH 8ULqyw9m9NjetoVIcUlOdHLgasHDouLRCiDoKCzP1Y2Z4zmsbSrHsJq0kn6za1elv0dw un3XasbEk6gkTBYc3+gNJpXu7zQlFiIiVTvtDMYwroHDgQWIArvo+fN0NhmpIiwRZh+r 4fE2xjJDuAlo9QdMGtneOtfHh/NZCTNtlEQ/0X8YtRftClGr2jqoP2XLqJDB0MIDgc2I +DXg== X-Gm-Message-State: APjAAAWAbw3dTdTRwUSQ3mAn+iC19A4wG7+zs0ISSnuLQt7N9SZHZ8mq AfWne/uuW4Bjiqg2GPTh1MtJ9ZUNCNo1cdx4mOpEgg== X-Google-Smtp-Source: APXvYqyB2K4v50tJV+QUjYVvPx2GE4cAV8zNEFHyvc26gjlMcho7zESTjUCEvGui5qZ3bKAJRB9/dPqXkyurw/5ySFI= X-Received: by 2002:a81:924d:: with SMTP id j74mr5795884ywg.381.1574523607158; Sat, 23 Nov 2019 07:40:07 -0800 (PST) MIME-Version: 1.0 References: <9e8eb38a-9f4a-64af-9dfe-271714609fb5@systemli.org> In-Reply-To: <9e8eb38a-9f4a-64af-9dfe-271714609fb5@systemli.org> From: Konstantin Kulikov Date: Sat, 23 Nov 2019 18:39:56 +0300 Message-ID: Subject: Re: Starting Wireguard on boot / Wireguard Init Script To: Dieter Cc: ~alpine/users@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" add relevant config to /etc/network/interfaces, for example I have this on my server: auto wg0 iface wg0 inet static address 10.236.153.1 netmask 255.255.255.0 pre-up ip link add dev wg0 type wireguard pre-up ip link set dev wg0 mtu 1450 pre-up wg setconf wg0 /etc/network/wg0.conf post-down ip link delete dev wg0 No need for custom boot scripts. On Sat, Nov 23, 2019 at 5:13 PM Dieter wrote: > > Hi, > > I want to start my wireguard vpn on my alpine VM on boot. The VPN works > fine when I start it with "sudo wg-quick up wg0" but I dont want to do > that every one and also I need to be able to reboot the VM when Im not > at home. > > I found the documentation in the wiki a bit confusing. Also it says that > its still work in progrss. > https://wiki.alpinelinux.org/wiki/Writing_Init_Scripts > > Can I just make alpine execute "sudo wg-quick up wg0" after boot? Is > there a wireguard init script somewhere already that I can use? Or could > you show me an example init script? > > thanks in advance