Hello everybody,
To be able to ssh into a remotely located RPI I'm trying to connect it to my Openvpn server.
The server works with both a windows client and the RPI but when I'm trying to connect over a 3g modem on the PI i don't have internet acces anymore.
The connection is also broken after a minute or so and tries to reconnect but fails.
The problem is exactly the same as descibed in:
https://forums.openvpn.net/viewtopic.php?f=4&t=21844
https://forums.openvpn.net/viewtopic.php?t=21913
So I have tried the solution at the end of the second link but i'm stuck at an error running the up script.
Thu Jan 19 07:48:19 2017 /etc/openvpn/up.sh tun0 1500 1570 10.8.0.2 255.255.255.0 init
Thu Jan 19 07:48:19 2017 WARNING: Failed running command (--up/--down): could not execute external program
Thu Jan 19 07:48:19 2017 Exiting due to fatal error
The solutions of both threads are nearly identical but i can't get the up script to run.
The scripts are executable by the way.
Any help would really be appreciated and don't be affraid to point out the obvious i'm and electronics engineering student so networking isn't really my strongsuit.
I added this at the bottom to the client configuration
up /etc/openvpn/up.sh
down /etc/openvpn/down.sh
And here are the up and down scripts
#!/sbin/bash
#up.sh
#Added the following two lines
umts_gateway=$(/sbin/ifconfig ppp0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
/sbin/ip route add $trusted_ip/32 via $umts_gateway
#!/sbin/bash
#down.sh
#Added the line below
/sbin/ip route delete $trusted_ip