[SOLVED] OpenVPN 2.1 requires '--script-security 2'

Need help configuring your VPN? Just post here and you'll get that help.

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.
Locked
gonesurfing
OpenVpn Newbie
Posts: 7
Joined: Tue Dec 21, 2010 5:58 am

[SOLVED] OpenVPN 2.1 requires '--script-security 2'

Post by gonesurfing » Sun Sep 18, 2011 5:54 am

hi
i am having a permisson problem with a new install on ubuntu 11.04 i have google the error and also tryed a new install but with no luck when i run this command
~$ sudo openvpn /etc/openvpn/server.conf

i get this error

Sun Sep 18 15:07:18 2011 OpenVPN 2.1.3 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Mar 11 2011
Sun Sep 18 15:07:18 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Sep 18 15:07:18 2011 Cannot open easy-rsa/keys/dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
Sun Sep 18 15:07:18 2011 Exiting

i can view the files in the file manager they do exist and i have pleyed around with the permissions on the files but with no luck
i am now back to a new install with the same error
thanks for any help steve

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN 2.1 requires '--script-security 2'

Post by janjust » Sun Sep 18, 2011 5:30 pm

the 'script-security' warning is misleading - the true cause of the problem is the fact that openvpn cannot read the dh1024.pem file; did you run
./build-dh
? Is the file accessible to the user which is configured to run openvpn?

gonesurfing
OpenVpn Newbie
Posts: 7
Joined: Tue Dec 21, 2010 5:58 am

Re: OpenVPN 2.1 requires '--script-security 2'

Post by gonesurfing » Sat Sep 24, 2011 7:55 pm

hi
"did you run ./build-dh"
yes i did
"Is the file accessible to the user which is configured to run openvpn"
the file is accessible as the root which is how i installed openvpn by running "sudo su" before the install
the server config : user nobody : group nobody
however i hav'nt configured a user to run openvpn
thanks for any help

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN 2.1 requires '--script-security 2'

Post by janjust » Sun Sep 25, 2011 10:02 pm

check the entire path to the dh1024.pem file to see if it can be read by user nobody, group nobody .

a quick&dirty debugging trick is to disable 'user nobody' and see if it then runs - if so, then your path/file permissions are wrong. If it won't run with 'user nobody' disabled then you've not specified the right path.

gonesurfing
OpenVpn Newbie
Posts: 7
Joined: Tue Dec 21, 2010 5:58 am

Re: OpenVPN 2.1 requires '--script-security 2'

Post by gonesurfing » Wed Oct 05, 2011 9:11 am

Thanks for the debugging tip janjust i simple had the file /path wrong

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: OpenVPN 2.1 requires '--script-security 2'

Post by janjust » Wed Oct 05, 2011 9:16 pm

Excellent! closing topic.

Locked