openvpn down script [partially solved]

Kernels & Hardware, configuring network, installing services

openvpn down script [partially solved]

Postby bookworm1232009 » 2017-06-24 13:19

I'm using openvpn and have noticed not all the tasks in my "down" script are being executed.

My "*.conf file" is as follows:
remote 1194 tcp-client
auth-user-pass /etc/openvpn/client/password
ca /etc/openvpn/client/ca.crt
redirect-gateway def1
dev tun
remote-cert-tls server
cipher AES-128-CBC
auth SHA1
script-security 2
up /etc/openvpn/client/openvpn-up-dnsserver
down /etc/openvpn/client/kill-transmission-gtk-dnsserver

My "/etc/openvpn/client/kill-transmission-gtk-dnsserver" is as follows:

# kill transmission-gtk if it is still running
killall transmission-gtk

cp /etc/resolv.conf /etc/openvpn/client/resolv.conf.up
cp /etc/openvpn/client/resolv.conf.down /etc/resolv.conf

The last two lines of "/etc/openvpn/client/kill-transmission-gtk-dnsserver" are executed but the line with "killall transmission-gtk" does not get executed.

This "*.conf" and down script use to fully work with Debian Jessie and its only after installing Debian Stretch that the problems started.

I included a "verb" line in the "*.conf" and reviewed "/var/log/syslog". Unfortunately there are no error messages coming up regarding "/etc/openvpn/client/kill-transmission-gtk-dnsserver".

Any suggestions on where I'm going wrong or the direction I need to take would be greatly appreciated.
Last edited by bookworm1232009 on 2017-07-04 10:48, edited 1 time in total.
Posts: 8
Joined: 2010-12-28 10:34

Re: openvpn down script

Postby bookworm1232009 » 2017-07-04 10:48

I've partially solved my problem where not all tasks in my "down" script are being executed.

Previously, to start and stop my openvpn connection I issued the following commands (and worked fine under Debian Jessie):
To start:# systemctl start openvpn@["name.of.vpn.service"].service
To stop:# systemctl stop openvpn@["name.of.vpn.service"].service

My problem is solved when I issue the following commands:
To start:# openvpn --config /etc/openvpn/["name.of.vpn.service"].conf &
To stop:# killall openvpn
Posts: 8
Joined: 2010-12-28 10:34

Return to System configuration

Who is online

Users browsing this forum: No registered users and 4 guests