Ping in remote network does not work from --up script
Posted: Sat Dec 26, 2020 6:20 am
Hey there, I thought I would try a rather simple setup for the beginning. Sadly fail quite early 
What I try is, to run a cronjob every night, which sets up an OpenVPN tunnel to a remote machine and then starts the backup script.
What works:
and then in another window:
What does not work:
I also tried --route-up
with backup-worker.sh:
What's going wrong?
I am on
Any help really appreciated, being stuck there since weeks o_O

What I try is, to run a cronjob every night, which sets up an OpenVPN tunnel to a remote machine and then starts the backup script.
What works:
Code: Select all
sudo openvpn --config /home/molt.ovpn
Code: Select all
ping 10.8.0.1
What does not work:
Code: Select all
sudo openvpn --config /home/molt.ovpn --up /home/scripts/backup-worker.sh
with backup-worker.sh:
Code: Select all
ping -c 1 -W 120 10.8.0.1
I am on
Code: Select all
Ubuntu 18.04.5 LTS (Bionic Beaver)
OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Any help really appreciated, being stuck there since weeks o_O