I wrote simple server-client OpenVPN config files:
server.conf
dev tun0
ifconfig 10.8.0.1 10.8.0.2
client.conf
dev tun0
ifconfig 10.8.0.2 10.8.0.1
remote 192.168.0.123
which basically is a cleartext OpenVPN tunnel - for now on its ok to me, I just learn it from basics, the point is - yay, it works! :)
I also wrote a tiny simple bash script to automatically run client:
#!/bin/bash
openvpn --config client.conf
and saved as run.sh
. Then, wanted to add it to cron
to allow client connect to vpn server at the time I want.
I did:
crontab -e
11 5 * * * /home/mirx/run.sh
but I dont see any connected client on server site - does my cron entry work or not? On client site I dont see any new tun
interface when I check it with ifconfig
. Any ideas?