breakena
Hello all,
I am a newbie and I just need to be pushed in the right direction .I need a script on a openvpn server that checks for the client connection then starts the openvpn server .I have placed this script in the scheduler of the server to run every minute.
Server
#######################################
ifconfig | grep tap0 > /dev/null
t=$?
if [ "$t" != 0 ]; then
echo "$t"
echo "no tap-device available"
logger -t TAPTEST "no tap-device available"
logger -t TAPTEST "$t"
modprobe tun
service vpnserver1 start
logger -t TAPTEST "tap started"
sleep 3
fi
############################################
This is my client configuration
Client
#######################################
remote X.X.X.X
port 1194
dev tap
secret staticvpn.key
proto udp
comp-lzo
route-gateway X.X.X.X
redirect-gateway def1
float
route-method exe
route-delay 2
##############################################