Jump to content
Not connected, Your IP: 3.145.131.238
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...