Debian Jessie to Stretch upgrade - Openvpn to 2.4.0

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
sandrone81
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 06, 2018 11:12 am

Debian Jessie to Stretch upgrade - Openvpn to 2.4.0

Post by sandrone81 » Tue Mar 06, 2018 11:35 am

Dear All,
I upgraded my Debian Jessie server to Debian Stretch.
As you know, with this upgrade, openvpn upgraded to 2.4 version.
I don't know if my issue is related to debian or openvpn upgrade.
BTW, the issue is with this UP script I have in the config file:
Config file:

Code: Select all

...
script-security 2
up /etc/openvpn/up.sh
up-restart
...
/etc/openvpn/up.sh script :

Code: Select all

#!/bin/bash
/bin/echo "$trusted_ip" > /tmp/vpn.txt
i suppose there is some issue with security or something similar, because the file /tmp/vpn.txt is never created. No issue with old debian/openvpn version.
It seems that now openvpn script cannot "create" (or edit) file. is it possible?
I tried also to create a user (vpn) and add these entries:\\

Code: Select all

user vpn
group vpn
Of course, privileges are ok:

Code: Select all

drwxrwxrwt  15 root root  4096 mar  6 03:20 tmp
and

Code: Select all

-rwxr-xr-x 1 root root  121 mar  6 02:16 up.sh

No error on log, I just see:

Code: Select all

/etc/openvpn/up.sh tun0 1500 1570 10.0.0.42 10.0.0.41 init
Any ideas?


I need this because I have a nagios script that read that file with variable $trusted_ip and alert me in case of this is not the preferred one.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Debian Jessie to Stretch upgrade - Openvpn to 2.4.0

Post by TinCanTech » Tue Mar 06, 2018 12:53 pm

Are you starting with systemd ? If so post the unit file.

sandrone81
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 06, 2018 11:12 am

Re: Debian Jessie to Stretch upgrade - Openvpn to 2.4.0

Post by sandrone81 » Tue Mar 06, 2018 1:33 pm

I found the issue...
the new openvpn version can "edit" or "create" file on /etc/openvpn folder (perhaps inside the chroot dir?).
If I create the script :
/bin/echo "$trusted_ip" > /etc/openvpn/vpn.txt
It works...
:)

Post Reply