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:
viewtopic.php?f=4&t=21844
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.
Code: Select all
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 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
Code: Select all
up /etc/openvpn/up.sh
down /etc/openvpn/down.sh
Code: Select all
#!/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
Code: Select all
#!/sbin/bash
#down.sh
#Added the line below
/sbin/ip route delete $trusted_ip