-3

When the log of openvpn hit this line Thu Jan 01 23:47:36 2015 Restart pause, 5 second(s) like this:

Thu Jan 01 23:47:57 2015 VERIFY OK: depth=1, C=US, ST=CA, L=SanFrancisco, O=Fort-Funston, OU=changeme, CN=changeme, name=changeme, emailAddress=mail@host.domain
Thu Jan 01 23:47:57 2015 VERIFY OK: nsCertType=SERVER
Thu Jan 01 23:47:57 2015 VERIFY OK: depth=0, C=US, ST=CA, L=SanFrancisco, O=Fort-Funston, OU=changeme, CN=changeme, name=changeme, emailAddress=mail@host.domain
Thu Jan 01 23:47:59 2015 Connection reset, restarting [0]
Thu Jan 01 23:47:59 2015 SIGUSR1[soft,connection-reset] received, process restarting
Thu Jan 01 23:47:59 2015 MANAGEMENT: >STATE:1420130879,RECONNECTING,connection-reset,,
Thu Jan 01 23:47:59 2015 Restart pause, 5 second(s)

I want to restart my internet, (disconnect modem and reconnect it again). I already wrote this on my my-account.ovpn:

script-security 2
up client-connect.sh
down client-disconnect.sh

my client-disconnect.sh:

#!/bin/sh
profile start > /dev/null

but it doesn't work. Any ideas ?

orlea
  • 547
  • 2
  • 5
  • 13

1 Answers1

1

First off, use more debugging. Write something like this into client-disconnect.sh (assuming profile start is the command to restart your internet connection):

#!/bin/sh
profile start 2>&1 | logger -t 'client-disconnect'

Then, check your OpenVPN configuration. If OpenVPN does not run as root user, any scripts it starts on shutdown cannot do that either, unfortunately but logically. So if you want something like this, either reduce the security (remove the user, group and chroot directives), or use sudo and allow the OpenVPN user to restart your internet connection, passwordlessly.

mirabilos
  • 5,123
  • 2
  • 46
  • 72