Tag Info

New answers tagged

0

Use the --ping and --ping-restart (or --keepalive) options and openvpn will reconnect when it looses the connection.


2

Do something like this server=$(cat /etc/openvpn/anonvpn.conf |grep remote|cut -d" " -f2) nextserver=$(grep -A1 $server /etc/openvpn/list.txt|grep -v $server) if [ -z "$nextserver" ]; then nextserver=$(head -n1 /etc/openvpn/list.txt) fi sed -i "s!$server!$nextserver!" /etc/openvpn/anonvpn.conf create the file /etc/openvpn/list.txt with your list of ...


0

As a workaround create a script that checks if openvpn is still running: if ! pgrep "openvpn" > /dev/null; then /usr/sbin/service openvpn restart echo "["$(date "+%Y-%m-%d %H:%M:%S")"] openvpn restarted">> /var/log/openvpn.log fi and call chat script minutely in your crontab


0

I managed to solve this issue with your help. Had to add additional rules for incoming and outcoming over eth1 and alter the PREROUTING condition to only match the ip 192.168.1.5 instead of adding a rule. The routing approach with ip rule add from 192.168.1.5/32 table DIRECT caused all traffic from 192.168.1.5 to go over eth1 instead of only port ...


2

You would need policy routing to set up routing tables for each specific traffic. I've found a concise and good example in Linux Advanced Routing Mini HOWTO. Put the following line in /etc/iproute2/rt_tables: 1 DIRECT Then you can do like: iptables -t mangle -A PREROUTING -p tcp --dport 900:999 -j MARK --set-mark 1 ip route add default via <gateway ...


0

It seems the script expects several parameters which are set by OpenVPN in the environment variables like time_unix and time_duration, but they are missing. You shouldn't directly run it. Have you set up the script correctly as explained in the document? See also OpenVPN manpage. You might want to add printenv to debug the script. All available ...


1

As openvpn needs root privileges to set routes or ip addresses for an interface it is very uncommon to run it as a user, if possible at all. But the command not found is a simple PATH topic. Check sudo which openvpn where root calls the binary. Normally openvpn lives in /usr/sbin, a location for daemon programs, that are started as root and possible ...


1

I don't believe that there's any specific command to do a syntax check, but you can run openvpn in the foreground, which should show the specific error: openvpn --config /path/to/server.conf


0

Just a minor tidbit. I know this is a Linux site, but I also ran into this exact issue during my use of Windows, even though the key I generated was 2048bit. Not sure if it is the same, but openvpn-install-2.3.7-I601-x86_64 doesn't yield the error, while openvpn-install-2.3.7-I602-x86_64 does. The older version worked. I uninstalled the new one, ...



Top 50 recent answers are included