Page 1 of 1
howto iroute to be added dynamically using client-connet
Posted: Tue Jan 31, 2012 12:07 pm
by tushar.sharma
Hello all,
I want to create a file in ccd/common-name of connecting client dynamically.
i wrote one script but it is not working , i don't it is right or wrong so please help
me to add iroute to ccd/common-name using client-connect script.
ThankingYou
Tushar
Re: howto iroute to be added dynamically using client-connet
Posted: Tue Jan 31, 2012 2:54 pm
by maikcat
in ccd directory you create text files named after the certificates
ccd files are not scripts,they contain openvpn directives (like iroute)
you can also use ifconfig-push directive to force a specific ip to your
client so you can easily troubleshoot if you created ccd files correctly..
Michael.
Re: howto iroute to be added dynamically using client-connec
Posted: Wed Feb 01, 2012 6:57 am
by tushar.sharma
Thanks for reply,
There are two ways as listed in manual either through ccd or --client-connect
I want to add iroute to openvpn dynamically whenever client connects ..
files in ccd/ cannot be created on fly so --client-connect is only option but
howto add iroute dynamically using --client-connect script.
Thanking You,
Tushar Sharma
Re: howto iroute to be added dynamically using client-connet
Posted: Wed Feb 01, 2012 7:52 am
by maikcat
i believe your problem is with route statement not iroute inside ccd files...
dont forget that you must use BOTH route command inside server config and
iroute inside ccd client file.
Michael.
Re: howto iroute to be added dynamically using client-connet
Posted: Thu Feb 02, 2012 12:12 pm
by tushar.sharma
Dear Michael,
Nopes Problem is not with route statement. I execute that outside of openvpn.
Let me explain it with actual scenario.
I have one openvpn server running that allows 10 client. I don't know common name of connecting
client in advance, so i cannot create files in ccd/ folder before hand.
Now i want that whenever client connects iroute command that we write in ccd/common_name_file should be addedd dynamically. As as far i understood from manual --client-connect targets this problem but i don't know how.
Thanking You
Tushar