openvpn wiki page updates

General support for problems installing or using Deluge
Post Reply
pir
New User
New User
Posts: 1
Joined: Thu Mar 09, 2023 11:22 am

openvpn wiki page updates

Post by pir »

The wiki page: https://dev.deluge-torrent.org/wiki/UserGuide/VPN
has some out of date scripting for FreeBSD multiple routing tables that does not work with modern openvpn in all cases.

I would suggest updating the FreeBSD multiple routing tables section with these changes:
setfib -1 /path/to/deluged -l /var/log/deluged/deluged.log -L info -i `ifconfig tun0 | awk '$1 == "inet" {print $2; exit}'`
1. Create /usr/local/etc/openvpn/link-up.sh with the following content:

#!/bin/sh
/usr/sbin/setfib -1 /sbin/route add default "$route_vpn_gateway"
# you can also restart deluged here to update the VPN IP address

2. Add the following lines to the vpn config file:

script-security 2 # allow scripts to be run
route-noexec # prevent default route being added to main routing table
up-restart # up scripts are run on restart as well
up "/usr/local/etc/openvpn/link-up.sh"

A link-down.sh script can be added in a similar way to stop the deluged service since the VPN IP address is no longer valid.
bro
Top Bloke
Top Bloke
Posts: 364
Joined: Sun Aug 28, 2011 6:46 pm
Location: Norway

Re: openvpn wiki page updates

Post by bro »

Hi

I've updated the FreeBSD section to work with FreeBSD 13. Looks good?
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Post Reply