Author: Paolo Lulli <paolo@lulli.net>
fixed client certs encrypt
iron-vpn/vpn-client | 16 ++++++++--------
diff --git a/iron-vpn/vpn-client b/iron-vpn/vpn-client
index ee9a1d9736501095d7d0a3ba5a33de1a010890c8..385489240e626d28589d6f38335be8e014c72c4b 100755
--- a/iron-vpn/vpn-client
+++ b/iron-vpn/vpn-client
@@ -43,8 +43,7 @@ cat<<__EOT__>$CFGDIR/server/${code_organization}-client/${vpn_client}/${code_organization}.conf
client
dev tun
proto tcp
-#remote ${code_organization}
-remote 62.171.171.30 1194
+remote ${code_organization} 1194
resolv-retry infinite
nobind
comp-lzo
@@ -75,8 +74,7 @@ cat<<__EOT__>$ovpnfile
client
dev tun
proto tcp
-#remote ${code_organization}
-remote 62.171.171.30 1194
+remote ${code_organization} 1194
resolv-retry infinite
nobind
comp-lzo
@@ -116,10 +114,12 @@
ovpn_generate_client_nopass ${vpn_client}
-openssl rsa -aes256 -in $CFGDIR/server/${code_organization}-client/${vpn_client}/${vpn_client}/${vpn_client}.key -out $CFGDIR/server/${code_organization}-client/${vpn_client}/${vpn_client}/encrypted-${vpn_client}.key\
- -passout pass:${client_password}\
- && mv $CFGDIR/server/${code_organization}-client/${vpn_client}/${vpn_client}/encrypted-${vpn_client}.key $CFGDIR/server/${code_organization}-client/${vpn_client}/${vpn_client}/${vpn_client}.key
-
+openssl rsa -aes256 -in $CFGDIR/pki/private/${vpn_client}.key\
+-out $CFGDIR/pki/private/encrypted-${vpn_client}.key \
+-passout pass:${client_password}\
+&& \
+mv $CFGDIR/pki/private/encrypted-${vpn_client}.key \
+$CFGDIR/pki/private/${vpn_client}.key
ovpn_generate_client_android
ovpn_generate_client_assembly