Down script not run

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
davr971
OpenVpn Newbie
Posts: 1
Joined: Thu Aug 06, 2015 2:59 pm

Down script not run

Post by davr971 » Sat Oct 24, 2015 11:40 pm

Hi all,

I'm currently facing an issue with the down script of my openvpn client, but only when running openvpn as a service.

If I start the VPN session with

Code: Select all

sudo openvpn --config /etc/openvpn/ipvanish-BE-Brussels-bru-b01.conf
, then exiting the session with Ctrl+C, the up and down script are properly run (transmission goes up and down).

But when I start/stop the session using

Code: Select all

service openvpn start
service openvpn stop

The up script is always properly run, but most of the time the down script is not run (transmission daemon stay up)

Hereafter a my config file:

Code: Select all

client
dev tun
proto udp
remote bru-b01.ipvanish.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
persist-remote-ip
ca /etc/openvpn/ca.ipvanish.com.crt
tls-remote bru-b01.ipvanish.com
auth-user-pass
comp-lzo
verb 3
auth SHA256
cipher AES-256-CBC
keysize 256
tls-cipher DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA
auth-user-pass /etc/openvpn/login.txt
auth-nocache
script-security 2
up-restart
up /etc/openvpn/vpn_up.sh
down /etc/openvpn/vpn_down.sh
vpn_up.sh:

Code: Select all

#!/bin/bash
service transmission-daemon start
vpn_down.sh:

Code: Select all

#!/bin/bash
service transmission-daemon stop
=> Does anybody ever faced this kind of misbehavior ?

Thanks in advance for your support

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Down script not run

Post by Traffic » Tue Oct 27, 2015 12:38 pm

Please set --verb 4 in your config and then post your server log

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Down script not run

Post by Traffic » Tue Oct 27, 2015 1:50 pm

Traffic wrote:Please set --verb 4 in your config and then post your server log
I meant your client log. 8-)

Post Reply