Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

qBittorrent + OpenVPN

Joined
Dec 1, 2018
Messages
25
Hello everyone!

I'm not sure this is the right place to ask this, but here it goes.

I've built my FreeNAS system recently and have been having a lot of fun setting it up and installing jails and learning about FreeBSD. I have hit a bit of a snag, which i hope someone here might be able to help me. My weakest point is networking, so please bear with my temporary lack of knowledge.
I've been trying to get qbittorrent to work alongside openvpn, trying to adapt the tutorial for Transmission i found here. However, i must be doing something wrong, for several reasons:

1. I don't get an external IP change, meaning that openvpn is not working properly. I use wget -qO - http://wtfismyip.com/text to check it. My regular IP starts with 148 and it should start with 82 if the VPN was working.
2. I can't access the qbittorrent through the webui on a computer on my network. I misconfigured the firewall rules, but i'm not sure at which point, or if at several points. Also, i assumed that the IP of entrance node would be that IP of the VPN server i'm connecting to, so i instead used the server non-IP address (as in something.something.com:port) - i assume this is also not correct, but i could not find much on this, as my searches on the topic invariably led to stuff related to TOR. I probably don't know the right terms to search for this.
3. The third part of the tutorial, changing the whitelist permissions, i could not do, since qbittorrent does not have that file, that i know of.

I'll include below the commands i used to create the jail:
Code:
echo '{"pkgs":["bash","wget","unzip","unrar","qbittorrent","openvpn","ca_root_nss"]}' > /tmp/pkg.json
iocage create -n "qbittorrent" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.1.7/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on" allow_tun="1"
rm /tmp/pkg.json
iocage exec qbittorrent mkdir -p /config/
iocage exec qbittorrent mkdir -p /downloads/
iocage exec qbittorrent chown -R qbittorrent:qbittorrent /config/
iocage fstab -a qbittorrent /mnt/software/apps/qbittorrent/config /config nullfs rw 0 0
iocage exec qbittorrent chown -R qbittorrent:qbittorrent /downloads/
iocage fstab -a qbittorrent /mnt/tank/share1/Downloads/Torrents_DL /downloads nullfs rw 0 0


# Allow internal traffic
add 03000 allow IP from 192.168.1.7/24 to 192.168.0.0/24 keep-state
add 03000 allow IP from 192.168.0.0/24 to 192.168.1.7/24 keep-state

# Allow access to Entrace IP for VPN
add 04000 allow IP from 192.168.1.7/24 to something.something.com:2345 keep-state

# Allow any traffic over the VPN interface
add 05000 allow IP from any to any via tun*

# Deny any other traffic
add 65534 deny IP from any to any



iocage exec qbittorrent "chown 0:0 /config/ipfw_rules"
iocage exec qbittorrent "chmod 600 /config/ipfw_rules"
iocage exec qbittorrent sysrc "firewall_enable=YES"
iocage exec qbittorrent sysrc "firewall_type=/config/ipfw_rules"
iocage exec qbittorrent sysrc "openvpn_enable=YES"
iocage exec qbittorrent sysrc "openvpn_dir=/config"
iocage exec qbittorrent sysrc "openvpn_configfile=/config/openvpn.conf"
iocage exec qbittorrent sysrc "qbittorrent_enable=YES"
iocage exec qbittorrent service ipfw start
iocage exec qbittorrent service openvpn start
iocage exec qbittorrent service qbittorrent start


I'm at my wits end, so any help you can provide would be very very appreciated, even just the correct terms to google the information i need.
 
Top