Page 1 of 1
transmission WEBUI HTTPS Access via NAS
Posted: Tue Jan 19, 2010 1:53 pm
by frossie
Hello,
i have a Qnap TS110 and i've installed transmission.
I registered my NAS to DynDns to access from internet to my NAS .
The nas support natively HTTPS , so i had no risk..
The problem is that transmission is visible like http://nas_ip:9091/transmission/web and i would like to transform it in https://nas_ip/transmission/web .
I read some topics in internet but i think tha without third party software i'll be able to connect with ssl protocol ( with modifying Apache configuration on the nas and transmission configuration) .
Someone linux expert (and transmission expert) can help me ?
thanks,fabio
Re: transmission WEBUI HTTPS Access via NAS
Posted: Tue Jan 19, 2010 6:18 pm
by rb07
There are several different procedures outlined here:
http://forum.transmissionbt.com/viewtop ... f=3&t=8163, my guess is that you already have what you need, no 3rd-party software needed.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Tue Jan 19, 2010 8:24 pm
by frossie
hi,
thanks for your reply.
i read the thread but i'm not sure if it is my case..'cause i have a Qnap NAS model TS110 with a linux embedded and natively support https.
I follow the procedure to install transmission via putty ipkg and it works well but only in http://nas_ip:9091/transmission/web/...and obviously it works only in my lan.
I have published my NAS over internet via DYnDNS in https..i reach all web part and i would like to add the path /transmission/web but unfortunately i need a guide !
Can you help me ?
thank you very much
fabio
Re: transmission WEBUI HTTPS Access via NAS
Posted: Tue Jan 19, 2010 11:14 pm
by rb07
I don't have a QNAP but let's assume its similar to my HP, and further assume that you know enough Linux to understand what follows.
- You need terminal level access to the NAS, either telnet or ssh.
- Look into the files /etc/ssl.conf and /etc/httpd.conf (you need to know how to configure Apache to understand it, or blindly follow instuctions);
- Those files will be recreated on boot, so you have to make a copy somewhere and edit the copy, for instance if you logged in as root make a copy to root's home directory;
- The changes to Apache configuration are what was shown in the link I gave you, look at my post which takes you to another post, you need to add verbatim the first code sample to httpd.conf and the third code sample to ssl.conf inside the VirtualHost section (you have a nice full example in the last code section of the post, the "Redirect permanent" is not needed);
- Now copy the 2 changed files to /etc (overwriting the originals);
- Tell Apache to reload its configuration:
Code: Select all
httpd -k restart -f /etc/httpd.conf
- Now test it.
As I said, those changes will be lost on reboot. What I do is run a script at reboot which recreates all the things I need, in this case its enough with:
Code: Select all
cp /root/httpd.conf /root/ssl.conf /etc && httpd -k restart -f /etc/httpd.conf
You can run scripts at boot with cron (if you have it), i.e. @reboot <command>, or using the init scripts (also if you have that, it wasn't on my NAS so I installed that part).
Re: transmission WEBUI HTTPS Access via NAS
Posted: Wed Jan 20, 2010 9:10 am
by frossie
Thanks for your answer..i 'll try..but i need some clarification ..
I have to modify the file /etc/ssl.conf and /etc/httpd.conf ? or the same file but in root home directory ?
i must add these code to httpd.conf
mod_proxy
mod_proxy_http
and these code to ssl.conf
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
ProxyPass /transmission
http://localhost:9091/transmission
ProxyPassReverse /transmission
http://localhost:9091/transmission
overwrit /etc/httpd.conf and /etc/ssl.conf .
restart apache
test it .
Is it correct ?
thank you, thank you, thank you !
Re: transmission WEBUI HTTPS Access via NAS
Posted: Wed Jan 20, 2010 4:17 pm
by rb07
frossie wrote:Thanks for your answer..i 'll try..but i need some clarification ..
I have to modify the file /etc/ssl.conf and /etc/httpd.conf ? or the same file but in root home directory ?
Yes.
The order is not important, you can copy the files, edit the copy, then copy them back to their place and restart Apache; or you can edit the originals, then make a copy, then restart Apache.
The point is first, you need a copy, and second, at reboot your changes will be lost so you have to restore them.
Also, it would be wise to test (syntax check) the configuration files before you restart the first time, and that is done with Apache, something like:
i must add these code to httpd.conf
mod_proxy
mod_proxy_http
Actually those are not needed, I just checked and both are compiled-in modules, try:
If they are in the list (they appear as "mod_proxy.c" and "proxy_http.c") then you don't need to add anything to httpd.conf.
On the other hand, in the rare case that they are not in the list, then you first have to locate them (/usr/modules perhaps) or build them, then add "LoadModule mod_proxy /usr/modules/mod_proxy.so" and so on.
Yes.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Wed Jan 20, 2010 5:50 pm
by frossie
thank you..
but i saw my configuration...
i don't have httpd.conf but etc/thttpd.conf ..
i don't have ssl.conf but only /ssl with openssl.conf and other files...but i saw stunnel ..
i'm reading stunnel manual and configuration..it's interesting....maybe it can help me.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Fri Jan 22, 2010 12:50 am
by rb07
Aha! So your NAS doesn't use Apache, it uses
http://en.wikipedia.org/wiki/Thttpd whatever that is. If it does reverse proxy then you can use it.
About stunnel, there was a reference to it on the link I gave you.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Fri Jan 22, 2010 1:12 pm
by frossie
Hi rb07,
i tried to use my nas like proxy server for other web application i've installed on it in various tcp port but it's very difficult for me because i'm not expert about linux application..
Yesterday i've tried to install squid to configure it like reverse proxy (and direct proxy for free internet navigation) but i'm newbie..
I tried to configure the apache (used in web server functionality) but it doesn't have mod_proxy and mod_proxy_http...
Stunnel crashed very often...
so , yesterday my nas crashed ..and i reinstalled all..but i'm strong ..i'll retry (with your help ...if you can) .
ciao,
Re: transmission WEBUI HTTPS Access via NAS
Posted: Fri Jan 22, 2010 4:04 pm
by rb07
Go easy.
Several points about your last post:
- It´s reverse proxy, not proxy what you want.
- Squid can do it, just sort out which port are you going to use... the title of this post says HTTPS, but if the Web server on your NAS is using it then you cannot use it with something else.
- Apache can load those modules dynamically, the thing is again you will have to disable your current Web server, and I don´t know if that is practical since in my NAS the native Web server gives you the control panel and other stuff. Then you have to find how to get those missing modules.
The solution to the port problem is to do a little port re-direction:
Firewall:443 -> ReverseProxy:3443 --->> backends (Transmission:9091; thttpd:443)
Of course the "ReverseProxy" also has to translate the https to http in the Transmission case, and not in the thttpd case. You should use a light proxy, not Apache or Squid, but perhaps Nginx or Pound.
Have you searched on a forum about your QNAP? Perhaps nascentral.com or is it .org? How are other people doing similar changes? also, thttpd forums could be interesting.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Fri Jan 22, 2010 4:20 pm
by frossie
thanks,
i'm interested in both reverse proxy ( first) than proxy configuration..
Obviously i would like to implement a sort of reverse proxy server to implement a solution to browse some web-application on my nas and , generally , on my home network ...
so i would like to implement from....to...
http://192.168.1.4:9091/transmission/web ---->https://FQDN_dyndns.org/transmission/web
http://192.168.1.4:8080 ---->https://FQDN_dyndns.org/admin
http://192.168.1.1 ---->https://FQDN_dyndns.org/router
http://192.168.1.1:667/darkstat ---->https://FQDN_dyndns.org/darkstat
And , (nice to have ) i would like to implement direct proxy (to surf internet Free from my office ) .
I'm not a linux expert but with microsoft isa server it's so easy...
Unfortunatelly,on Qnap forum it's not easy to get help ,but my request seems not "go to the moon" ...
Now i'm watching NGINX...seems to be easy...but i hope that this package is pre-compiled to use on my Qnap NAS (with ARM cpu) .
Tonight (in Italy) i'll try to get and configure NGINX
thanks, thanks, thanks !
ciao,
fabio
Re: transmission WEBUI HTTPS Access via NAS
Posted: Fri Jan 22, 2010 7:20 pm
by rb07
All of that is doable, and not hard.
In fact you wouldn't even need a proxy if you didn't require the use of https, i.e. could just map ports on the firewall.
I know Apache and Squid because that's what I use. BTW Microsoft's ISA Server is really an old Apache version which they modified (and made insecure).
I don't know Nginx, but you already have a reference on the thread I made reference to before.
Re: transmission WEBUI HTTPS Access via NAS
Posted: Sat Jan 23, 2010 11:14 am
by Ramgoti
How are you? I would like to Thanks for the informative post. I really appreciate it. I hope that I can get more benefit from this topic.
Thanks