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 connect.swissvpn.net 1194 tcp-client
persist-key
auth-user-pass /etc/openvpn/client/password
tls-client
pull
ca /etc/openvpn/client/ca.crt
redirect-gateway def1
nobind
persist-tun
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:
#!/bin/bash
# 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.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
openvpn down script [partially solved]
-
- Posts: 8
- Joined: 2010-12-28 10:34
openvpn down script [partially solved]
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
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
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