dynvpn as a service

1,405 views
Skip to first unread message

Sergio Monteiro

unread,
Feb 20, 2015, 4:32:20 PM2/20/15
to dyn...@googlegroups.com
I.
Could dynvpn run as a service ?
I want to add a server do the VPN and make it available while in log off mode.

Thanks
Sérgio

Nicolas J. Bouliane

unread,
Feb 21, 2015, 8:33:57 AM2/21/15
to dyn...@googlegroups.com
Hi Sergio !

On what system would you like to run the dynvpn client as a service ? (Linux, Windows, RPI, etc)

Nick

Nicolas J. Bouliane

unread,
Feb 21, 2015, 4:32:06 PM2/21/15
to Sergio Monteiro, dyn...@googlegroups.com
Meanwhile, I googled a bit, and i found this:

http://www.howtogeek.com/50786/using-srvstart-to-run-any-application-as-a-windows-service/

maybe you can give it a try, and tell me if it works !

In the dynvpn client, if you check the option "connect at startup",
your client will automatically connect when launched.

cheers,
Nick

On Sat, Feb 21, 2015 at 4:26 PM, Nicolas J. Bouliane <nic...@gmail.com> wrote:
> Hi Sergio,
>
> Unfortunately right now we can't run the windows client as a service,
> but I'll push the priority higher for that feature in the todo list
> since you asked for it !
>
> cheers,
> Nick
>
> On Sat, Feb 21, 2015 at 10:50 AM, Sergio Monteiro <serg...@gmail.com> wrote:
>> Hi Nicolas.
>> Windows system.
>>
>> Thanks

Sergio Monteiro

unread,
Feb 22, 2015, 11:38:52 AM2/22/15
to Nicolas J. Bouliane, dyn...@googlegroups.com
I Nicolas.
It doesn't work. A service must not have a GUI to execute successfully. Anyway, thanks for that link. It is usefull for other thinks.

Sérgio
humansoft.pt

Nicolas J. Bouliane

unread,
Feb 23, 2015, 6:29:59 PM2/23/15
to Sergio Monteiro, dyn...@googlegroups.com
Hi Sergio !

thanks for the feedback, i'll build a windows client without the GUI,
and I'll get back to you once it's done.

cheers,
Nick

Sergio Monteiro

unread,
Feb 23, 2015, 6:59:48 PM2/23/15
to Nicolas J. Bouliane, dyn...@googlegroups.com

Thank you very much for your atention Nicholas.

Nicolas J. Bouliane

unread,
Mar 1, 2015, 3:59:55 PM3/1/15
to dyn...@googlegroups.com, nic...@gmail.com
Hi Sergio

I built the latest version of the client (it's now called netvirt-agent) without the GUI
http://bin.dynvpn.com/test/netvirt-agent-cli-15.03.01_x86.exe

you have to run it via the console
the firt time you have to do  c:\..YOUR_PATH..\netvirt-agent.exe -k THE_KEY (the key is the one you find in your dashboard when you create a node)
once provisioned, you only need to call the "netvirt-agent.exe" the next time

please let me know it 1) it works, 2) you can run it as a service

cheers,
Nick

Luis Steve Martínez

unread,
Jul 21, 2015, 10:21:24 AM7/21/15
to dyn...@googlegroups.com
Hi Nicolas:


I'm trying to start automatically on ubuntu server 14.04 LTS, from /etc/rc.local, from /usr/sbin/myscript, from /etc/init.d/myscript, but I think netvirt-agent wants to pick conf from /home/user/.dynvpn/default/*.

Do you have some clue to achieve this?
PD. "# netvirt-agent -k PROV_KEY" and "# netvirt-agent" runs nice from sudoing user.

Thanks.

Nicolas J. Bouliane

unread,
Jul 21, 2015, 10:33:59 AM7/21/15
to dyn...@googlegroups.com
Hi Luis !

can you try this :

sudo -u YOUR_USER -c 'netvirt-agent'


commands executed from /etc/rc.local are executed as 'root', hence
netvirt-agent will look into /root/.netvirt/default/

by using sudo -U YOUR_USER, netvirt-agent will be executed by your
user, and will look into /home/YOUR_USER/.netvirt/default, where your
provisioned informations should be

please let me know it it works,

cheers,
Nick

Helder Silva

unread,
Sep 3, 2015, 5:25:15 AM9/3/15
to dynvpn
I am testing the program , but I have checked that day to day have to close and open again to be able to connect.
how i can resolve this?

Tácio Andrade

unread,
Mar 1, 2017, 12:11:20 AM3/1/17
to dynvpn
Staff tried this option, but it did not work. Does anyone know how to get it up during boot? I tried to add in rc.local the following command:

sudo -u -c tacio 'netvirt-agent and sudo -u tacio -c' / usr / bin / netvirt-agent '

But none of the 2 worked. Anyone have any idea how I can do it?

Nicolas J. Bouliane

unread,
Mar 1, 2017, 7:45:08 AM3/1/17
to Tácio Andrade, dynvpn
1/
   # sudo netvirt-agent -k YOUR_KEY

make sure that work, and able to connect.

2/
   # sudo apt-get install supervisor

3/
create file:  /etc/supervisor/conf.d/netvirt.conf

Put that information inside the file:

---------->8-----------------------------
[program:netvirt]
user=root
environment=HOME="/root",USER=root"
command=/usr/bin/netvirt-agent
---------->8-----------------------------

4/

    # sudo /etc/init.d/supervisord restart

5/

    # /sbin/ifconfig

Make sure netvirt0 interface is created

cheers,
Nick

Tácio Andrade

unread,
Mar 3, 2017, 10:13:20 PM3/3/17
to Nicolas J. Bouliane, dynvpn
Thank you very much from the heart, it really worked perfectly for my environment. \o/

Sincerely, Tácio Andrade.
--
Att. Tácio Andrade, Consultor de TI na MultiTI.com.br
Whatsapp - 077(9)8111-7727
Oi  - 073(9)8830-2419

Sebastian Nilsson

unread,
Jan 15, 2019, 6:25:24 AM1/15/19
to dynvpn
Thank you! Had to do some modifications to get it running on my ubuntu server. Maybe someone else will find my modification useful: https://sebastiannilsson.com/blog/setup-free-vpn-between-windows-and-ubuntu-linux-computers/

Cheers!
Reply all
Reply to author
Forward
0 new messages