Github messages for voidlinux
 help / color / mirror / Atom feed
* Re: My runit service for OpenVPN spawns repeatedly
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
  2021-03-10 11:00 ` My runit service for OpenVPN spawns repeatedly sgn
@ 2021-03-10 13:08 ` Anachron
  2021-03-15  0:19 ` sgn
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: Anachron @ 2021-03-10 13:08 UTC (permalink / raw)
  To: ml

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

New comment by Anachron on void-packages repository

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

Comment:
^ This. Make sure to stop the service (`sv stop openvpn`) and then kill all remaining processes. Edit the service file and try to start the service once (`sv once openvpn`). Good luck!

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

* Re: My runit service for OpenVPN spawns repeatedly
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
  2021-03-10 11:00 ` My runit service for OpenVPN spawns repeatedly sgn
  2021-03-10 13:08 ` Anachron
@ 2021-03-15  0:19 ` sgn
  2021-03-15  0:19 ` [ISSUE] [CLOSED] " sgn
  2021-03-15  0:19 ` sgn
  4 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-03-15  0:19 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

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

Comment:
I assumed this is user error. Closing.

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

* Re: [ISSUE] [CLOSED] My runit service for OpenVPN spawns repeatedly
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
                   ` (2 preceding siblings ...)
  2021-03-15  0:19 ` sgn
@ 2021-03-15  0:19 ` sgn
  2021-03-15  0:19 ` sgn
  4 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-03-15  0:19 UTC (permalink / raw)
  To: ml

[-- 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

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

* Re: My runit service for OpenVPN spawns repeatedly
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
                   ` (3 preceding siblings ...)
  2021-03-15  0:19 ` [ISSUE] [CLOSED] " sgn
@ 2021-03-15  0:19 ` sgn
  4 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-03-15  0:19 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

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

Comment:
Work as designed. Closing.

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

* Re: My runit service for OpenVPN spawns repeatedly
       [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
@ 2021-03-10 11:00 ` sgn
  2021-03-10 13:08 ` Anachron
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2021-03-10 11:00 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

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

Comment:
Don't use `--daemon`, runit expects service stay in foreground.

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

end of thread, other threads:[~2021-03-15  0:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29370@inbox.vuxu.org>
2021-03-10 11:00 ` My runit service for OpenVPN spawns repeatedly sgn
2021-03-10 13:08 ` Anachron
2021-03-15  0:19 ` sgn
2021-03-15  0:19 ` [ISSUE] [CLOSED] " sgn
2021-03-15  0:19 ` sgn

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).