Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] My runit service for OpenVPN spawns repeatedly
Date: Mon, 15 Mar 2021 01:19:20 +0100	[thread overview]
Message-ID: <20210315001920._Qke8Mv0bGulsEP8GEFT2C-g9I_uJyUGFEwuZc1msJk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 3527 bytes --]

Closed issue by kintarowonders on void-packages repository

https://github.com/void-linux/void-packages/issues/29370

Description:
I am trying to get a Void Linux system working with OpenVPN, and this is my first attempt at creating my own runit service. The OpenVPN package on Void Linux does not supply any init files or any configuration files in `/etc/openvpn`

I created the user `openvpn` and created `/etc/openvpn/client` and I put the following configuration file in it:

    client
    dev tun
    proto udp
    
    verb 5
    
    #Server IP and Port
    remote [redacted] 1194
    
    user openvpn
    group openvpn
    
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    mute-replay-warnings
    ca /etc/openvpn/client/ca.crt
    cert /etc/openvpn/client/client.crt
    key /etc/openvpn/client/client.key
    tls-auth /etc/openvpn/client/ta.key 1
    remote-cert-tls server

I then went to create my own runit service for OpenVPN by making the directory `/etc/sv/openvpn` and I created the run file in `/etc/sv/openvpn/run` with the following contents:

    #!/bin/sh
    
    [ -r conf ] && . ./conf
    exec /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon $OPTS

I made that service file executable and then went to start the OpenVPN process with the following command:

    # sv start openvpn
    ok: run: openvpn: (pid 858) 0s

It appears to have worked and so I check if the tun0 interface is running, and it is:

    4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
        link/none
        inet 10.8.0.102 peer 10.8.0.101/32 scope global tun0
           valid_lft forever preferred_lft forever
        inet6 fe80::475f:cd8d:32e1:2af3/64 scope link stable-privacy
           valid_lft forever preferred_lft forever

However after a few more seconds another tunnel interface is created, and so on again and again:

    5: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
        link/none 
        inet 10.8.0.102 peer 10.8.0.101/32 scope global tun1
           valid_lft forever preferred_lft forever
        inet6 fe80::fa30:8bfb:2168:6d7b/64 scope link stable-privacy 
           valid_lft forever preferred_lft forever
    6: tun2: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
        link/none 
        inet 10.8.0.102 peer 10.8.0.101/32 scope global tun2
           valid_lft forever preferred_lft forever
        inet6 fe80::8366:3479:ee34:5f47/64 scope link stable-privacy 
           valid_lft forever preferred_lft forever

For some reason my runit service keeps spawning OpenVPN over and over. Here are the processes:

    openvpn    865  0.1  0.5   9636  5864 ?        Ss   19:22   0:00 /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon
    root       869  0.2  0.5   9636  5784 ?        Ss   19:22   0:00 /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon
    root       871  0.0  0.5   9636  5784 ?        Ss   19:22   0:00 /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon
    root       877  0.3  0.5   9636  5892 ?        Ss   19:22   0:00 /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon
    openvpn    879  0.3  0.5   9636  5912 ?        Ss   19:22   0:00 /usr/bin/openvpn --config /etc/openvpn/client/client.conf --daemon

  parent reply	other threads:[~2021-03-15  0:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
2021-03-10 13:08 ` Anachron
2021-03-15  0:19 ` sgn
2021-03-15  0:19 ` sgn [this message]
2021-03-15  0:19 ` sgn

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=20210315001920._Qke8Mv0bGulsEP8GEFT2C-g9I_uJyUGFEwuZc1msJk@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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).