Help setting up VPN only for Transmission

Hi, I have an OpenVPN setup in my dietpi like so:

client
remote 97-1-ch.cg-dialup.net 443
dev tun
proto tcp
auth-user-pass /var/lib/dietpi/dietpi-vpn/settings_ovpn.conf

resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
#ncp-disable
auth SHA256
ping 5
ping-exit 60
ping-timer-rem
script-security 2
up /var/lib/dietpi/dietpi-vpn/static_up.sh
route-up /var/lib/dietpi/dietpi-vpn/up.sh
down /var/lib/dietpi/dietpi-vpn/static_down.sh
remote-cert-tls server
route-delay 5
verb 4

I’ve been facing multiple issues which I will describe below and I need to find a way to address them:

  1. As soon as I enable the VPN, I lose access from my PC (which is on another subnet but allowed in the router) to the dietpi (broken pipe);
  2. I only want to use the VPN client to a specific service/user (Transmission), everything else should remain using the normal traffic route as it always was;

How can I setup so? I already searched and tried multiple configs, but those end up never working, specially because I immediately lose access to the pi itself.

Thanks!

  1. You need to add this subnet in the allowed networks when the firewall kicks in.
  2. Has been discussed in other topics.

But the subnet is already allowed at the router level. Does it need to also be allowed here?

I’m trying the opposite (allow everything by default and túnel only a specific user).

I’ve checked a few guides but I’m struggling, specially with my specific setup, can you help me step by step?

Thanks.

Yes, I think so, because the device could have its own rules that prevent access as soon as the VPN is activated.

1 Like