OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: SkeelKat on December 06, 2019, 01:12:40 PM

Title: Transmission Daemon JSON/RPC and Nginx Reverse Proxy
Post by: SkeelKat on December 06, 2019, 01:12:40 PM
Hi Everyone.

I installed the Nginx reverse proxy on my Opnsense and basically have everything sorted. All sites redirect to upstream servers correctly using Let's Encrypt SSL certificates etc.

However I run Transmission torrent server on the one upstream server. The web access works 100% but the RPC/JSON commands used by 3rd party clients to control Transmission refuse to pass the Nginx Proxy...

Any idea on where to start looking for the issue?
Title: Re: Transmission Daemon JSON/RPC and Nginx Reverse Proxy
Post by: fabian on December 06, 2019, 05:44:07 PM
without an error you cannot get help.
Title: Re: Transmission Daemon JSON/RPC and Nginx Reverse Proxy
Post by: SkeelKat on December 10, 2019, 06:00:29 PM
That's just it.. I see no errors on the nginx logs, or on the client side that can explain the reason for the failure
Title: Re: Transmission Daemon JSON/RPC and Nginx Reverse Proxy
Post by: SkeelKat on December 11, 2019, 07:59:22 AM
@fabian,

After a bit more struggle I seem to get this when attempting to access the RPC server directly via a web browser

409: Conflict

Your request had an invalid session-id header.

To fix this, follow these steps:

    When reading a response, get its X-Transmission-Session-Id header and remember it
    Add the updated header to your outgoing requests
    When you get this 409 error message, resend your request with the updated header

This requirement has been added to help prevent CSRF attacks.

X-Transmission-Session-Id: wIyvmF9ZPChYpouYh55pOqh68OvKivZQh7lgI9ldfnF1JxCI


So I basically have to add  proxy_pass_header  X-Transmission-Session-Id; in the location... but how?