qBittorrent with Wireguard VPN - Can't access web interface

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
qlbolo
Posts: 3
Joined: Thu May 07, 2020 9:36 pm

qBittorrent with Wireguard VPN - Can't access web interface

Post by qlbolo »

I am setting up a new Odroid-N2 with Kodi, qbittorrent, and wireguard. However, using both the latest beta and stable build of DietPi, my network connection on my N2 is quote slow. Using iperf3, I am getting about 350 mbps on a gigabit network. I tried installing ubuntu-minimal, and I am back to around 930 mbps using iperf3 on the Odroid-N2. Sounds like a temporary solution until I can figure out why my DietPi install has such slow networking.

I installed qbittorrent-nox, everything seemed to work fine. I was able to access the qbittorrent web interface at 192.168.x.x:xxxx. However, once I installed and enabled Wireguard, I can no longer access my web interface at 192.168.x.x:xxxx. When I disable Wireguard (wg-quick down wg1) it works again. I don't think it is a Wireguard issue since everything else works fine, I get internet connectivity and can SSH into the Odroid-N2.

It works with both qbittorrent and wireguard on my Odroid-C2 with DietPi I am still using. Is there some special setting or configuration I need to use to get qbittorrent to work with Wireguard VPN?

Thanks.
User avatar
Joulinar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by Joulinar »

Hi,

do you use Wireguard as server or client on your DietPi installation?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
qlbolo
Posts: 3
Joined: Thu May 07, 2020 9:36 pm

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by qlbolo »

I am using Wireguard as a client connecting to a commercial VPN service. In addition to qBittorrent not working, I can't ping any PCs on my local network, though I can SSH into the Odroid box from my Windows PC on the local network.
Last edited by qlbolo on Tue May 12, 2020 12:45 am, edited 1 time in total.
User avatar
Joulinar
Posts: 2044
Joined: Sat Nov 16, 2019 12:49 am

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by Joulinar »

I guess you device is sending all the traffic to the VPN tunnel. Maybe @trendy could help as I guess some iptables would need to be adjusted/added.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
trendy
Posts: 119
Joined: Tue Feb 25, 2020 2:54 pm

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by trendy »

Local network traffic should not be affected by the vpn.
VPN will install a new default route for the 0/0 through the vpn endpoint, so all other traffic will go that way.
Could you post here the output of

Code: Select all

ip -4 addr; ip -4 ru; ip -4 ro list table all
before and after connecting to the vpn?
qlbolo
Posts: 3
Joined: Thu May 07, 2020 9:36 pm

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by qlbolo »

Sure. I noticed another wrinkle. I found that I can access my local network if I am root. So sudo ping 192.168.1.10 works fine, but when I am a regular user I get "Destination Host Unreachable".

Here is the output of "ip -4 addr; ip -4 ru; ip -4 ro list table all"
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.168.1.16/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
valid_lft 82686sec preferred_lft 82686sec
5: mullvad-ch7: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1
inet 10.65.141.26/32 scope global mullvad-ch7
valid_lft forever preferred_lft forever
0: from all lookup local
32760: from all uidrange 0-0 lookup main suppress_prefixlength 0
32761: not from all fwmark 0xca6c uidrange 0-0 lookup 51820
32762: from all uidrange 0-0 lookup main suppress_prefixlength 0
32764: from all uidrange 0-0 lookup main suppress_prefixlength 0
32766: from all lookup main
32767: from all lookup default
default dev mullvad-ch7 table 51820 scope link
default via 192.168.1.1 dev eth0 proto dhcp metric 100
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.16 metric 100
local 10.65.141.26 dev mullvad-ch7 table local proto kernel scope host src 10.65.141.26
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.1.0 dev eth0 table local proto kernel scope link src 192.168.1.16
local 192.168.1.16 dev eth0 table local proto kernel scope host src 192.168.1.16
broadcast 192.168.1.255 dev eth0 table local proto kernel scope link src 192.168.1.16
trendy
Posts: 119
Joined: Tue Feb 25, 2020 2:54 pm

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by trendy »

This is quite a complicated setup with policy based routing based on fwmarks.
Did you set this up yourself or was it provided by Dietpi or some other script?
In any case, post also the `iptables-save -c` when vpn is connected.
aftensleuk
Posts: 30
Joined: Sun Jul 21, 2019 8:27 pm

Re: qBittorrent with Wireguard VPN - Can't access web interface

Post by aftensleuk »

Hello!

Please look at the VPN-clients config file in /etc/wireguard

To allow local network access, you need to set the AllowedIPs to the following:

AllowedIPs = 0.0.0.0/0
Post Reply