Unable to create temporary file + client-connect script
Posted: Fri Oct 07, 2011 12:30 pm
Hello.,
I have created openvpn server and client its all working fine using authentication, allowed lan network on both sides.
Now i want to create file in ccd directory as per common name of connecting client.
For that i need to retrieve common name of connecting client. I have refer documents and manual page on openvpn.net site
but unable to do so. I have created one script script.sh in that i have just used
#!/bin/sh
echo $* > /path/tmp.txt
also i have tried
#!/bin/sh
if [ -n "$1" ] ; then
echo $1 > /path/tmp.txt
echo $common_name >> $1
else
exit 1
fi
But its not working . while i start server using openvpn --config openvpnserver.conf --client-connect script.sh and on other side starting client,, server get exit and its shows unable to create /tmp/openvpn_cc_oe.... file .
I have also tried using option --tmp-dir
but its not working..
Do any one have any example to retrieve environment variables of connecting client like common_name of other using
client-connect script...
thanking You,,
Tushar
I have created openvpn server and client its all working fine using authentication, allowed lan network on both sides.
Now i want to create file in ccd directory as per common name of connecting client.
For that i need to retrieve common name of connecting client. I have refer documents and manual page on openvpn.net site
but unable to do so. I have created one script script.sh in that i have just used
#!/bin/sh
echo $* > /path/tmp.txt
also i have tried
#!/bin/sh
if [ -n "$1" ] ; then
echo $1 > /path/tmp.txt
echo $common_name >> $1
else
exit 1
fi
But its not working . while i start server using openvpn --config openvpnserver.conf --client-connect script.sh and on other side starting client,, server get exit and its shows unable to create /tmp/openvpn_cc_oe.... file .
I have also tried using option --tmp-dir
but its not working..
Do any one have any example to retrieve environment variables of connecting client like common_name of other using
client-connect script...
thanking You,,
Tushar