Jump to content
Not connected, Your IP: 3.144.116.195
Sign in to follow this  
temperdu

ANSWERED Switching from PIA to AirVPN : problem with Deluge autostart

Recommended Posts

Hi, I gave AirVPN a try with a 1 euro trial. I actually try to switch from PIA (provateinternetaccess.com) for some reason.

 

I'm using a Raspberry Pi (SSH access, no GUI).

 

Downloading an openvpn conf file was flawless and wget http://ipinfo.io/ip -qO - gives me a suited IP. Fine.

 

My probem is : Deluge does no more start a boot, while the same config used to work fine with PIA.

 

I set up Deluge as in the official Deluge systemd documentation : http://dev.deluge-torrent.org/wiki/UserGuide/Service/systemd . So as to bind Deluge to the VPN connection, in your openvpn file, I added

 

route-up /etc/openvpn/route-up.sh
down /etc/openvpn/down.sh

 

with route-up.sh beeing

 

#!/bin/sh
iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE
systemctl start deluged

and down.sh beeing

#!/bin/sh
iptables -t nat -D POSTROUTING -o tun0 -j MASQUERADE
systemctl stop deluged

What's wrong with that ? (it was fine with PIA)
 

Share this post


Link to post

I made the necessary to add logging. It is supposed to produce /var/log/deluge/daemon.log.

 

Unfortunately, at statrup, no daemon.log file is produced. When I start the deamon manualy with sudo systemctl start deluged the deamon starts normally and I can connect to it through the regular Deluge web interface. There is also a brand new /var/log/deluge/daemon.log file but it is empty. Actually, the deamon is able to start when it is asked for. I guess that my problem comes from my openvpn config file.

 

 

# --------------------------------------------------------
# Air VPN | https://airvpn.org | Thursday 27th of October 2016 09:29:22 AM
# OpenVPN Client Configuration.
# AirVPN_Netherlands_UDP-443
# --------------------------------------------------------

client
dev tun
proto udp
remote nl.vpn.airdns.org 443
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-lzo no
route-delay 5
verb 3
explicit-exit-notify 5

route-up /etc/openvpn/route-up.sh
down /etc/openvpn/down.sh

... with the security ca, cert and key sections following, but I d'ont reproduce them. Anyway they seem to work because the Pi connects to the VPN.

 

Is something missing ? My route-up.sh and down.sh files are above. I also tried by removing the iptables lines.

 

 

 

Share this post


Link to post

I found the solution. Yoyu've been very helpfull by pointing the need of log files.Then I enables custom log files for openvpn and found the solution quickly. My open config file should have contained

script-security 2

so as to enable user scripts to be launched. So to sum up, my modified config file is

 

client
dev tun
proto udp
remote nl.vpn.airdns.org 443
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-lzo no
route-delay 5
verb 3
explicit-exit-notify 5
# DEB Ajouts maison
script-security 2
log-append /var/log/openvpn.log
route-up /etc/openvpn/route-up.sh
down /etc/openvpn/down.sh
# FIN Ajouts maison

... and authentification stuff following

and it works fine.

 

So I'll buy a longer AirVPN plan.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...