Then I will have all my traffic route through the wireguard interface. Because longest match subnet, then 0.0.0.0/1 and 128.0.0.1/1 would have priority over original 0.0.0.0/0.
If I didn’t set allowedips, then wireguard won’t even create connection to remote vpn server.
Thus, I test manually set 0.0.0.0 mask 0.0.0.0 gateway vpnip and metric highly than my ISP gateway to get my normal traffic through ISP. But then qbit doesn’t have connection ability through wireguard even though it is binded to wireguard interface.
Its kinda slow using vpn for all the traffic, so is there any way I can have my original traffic (eg. YT, spotify) through my ISP and vpn for torrenting?
Edit: The metric method works in the end. Problem is need to use
It’s built in to qbit…just go to options, advanced, network interface, and pick your VPN adapter…boom, done. Also, use split tunneling in your vpn client. set qbit to use the VPN and everything else not…but the binding is a MUST to keep from getting nasty letters.
If you are running qBit on Docker and only need VPN for your torrent client, take a look at Hotio’s qBit image that has Wireguard built in. Works great for me.
After that’s added to the routing list (cmd: route print), the ISP and VPN connection will have equal priorities for routing traffic. The next step is semi manual, you need to force all regular traffic through LAN:
route add 0.0.0.0 mask 128.0.0.0 <router IP> if 32
route add 128.0.0.0 mask 128.0.0.0 <router IP> if 32
route add ::/1 <link-local computer ip> if 32
route add 8000::/1 <link-local computer ip> if 32
Will the metric way work? I think it should work as same as you have two default gateways 0.0.0.0/0, then I just need to bind qbit to wireguard as I have already done.
Would this work on macOS if you had different users set up, one user running vpn and qbittorrent, and the other user running everything else (Not through VPN?)
Because in windows, if you set wireguard to 0.0.0.0/0, it would trigger kill-switch. If you untick the kill switch, then it would become 0.0.0.0/1 and 128.0.0.0/1 and thus route the traffic here according to longest subnet available.
I dont know if there is kill-switch in linux or mac. If you set Table = off , then wireguard would act normal and dont force you to use kill-switch. Then you could just bind qbit to the adapter, and use the metric policy route method.