Jump to content
Not connected, Your IP: 216.73.217.99
Sign in to follow this  
Y0W4N

Routing transmission-daemon through wireguard interface on Debian

Recommended Posts

Hello, I'm reaching out to the forum because I recently subscribed to the service, and I'm having issues getting Transmission to work through the VPN. I'm using the WireGuard protocol on a Debian PC (headless without GUI).
The WireGuard interface (wg0) is working fine; I can ping external addresses through it, use curl, and perform speed tests :

image.png.37242a7dbc495848774893f5693d12b4.png

The transmission-daemon also works perfectly when not going through the WireGuard interface but using my physical interface eth0.
When I bind Transmission to the wg0 interface (specifying its IP in "bind-address-ipv4"), no traffic goes through the VPN. The trackers are unreachable, and the error "announce error: could not connect to tracker" appears.
Running a netstat, I can see that Transmission is trying to connect to the tracker using various ports (why ?) through the WireGuard interface but never receives any traffic in return (SYN_SENT):

image.png.e9be81276f336e801b39679b28d5c114.png

However, these addresses are pingable through the wg0 interface:

image.png.732e2e74a665409d6a9741872f5d037a.png

I've tried approaching the problem from different angles, and after several hours without any solution, I'd like to know if any of you have encountered a similar issue? (I should mention that my firewall is completely disabled for the tests).

Thank you ! 
 

Share this post


Link to post

Is the VPN the default gateway? Or have you left eth0 as the default gateway? Otherwise, there would be no reason to bind transmission-daemon to the VPN IP address.

If you want to use the VPN with transmission-daemon without the VPN as default gateway, you need to set up source address routing.

For examples see:

https://github.com/tool-maker/VPN_just_for_torrents/wiki/Running-Non-Specific-VPN-on-Linux-without-VPN-as-Default-Gateway

or

https://github.com/tool-maker/VPN_just_for_torrents/wiki/Running-OpenVPN-on-Linux-without-VPN-as-Default-Gateway

The relevant bits are commands like this:

sudo ip -4 route add default $GATEWAY_VIA4 dev $GATEWAY_IF table $IP_TABLE

sudo ip -4 rule add from $GATEWAY_LOCAL4 table $IP_TABLE

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...