Hi.
I tried many ways to configure this program (Stunnel4) but cannot install it correctly.
Right now, I got Ubuntu 9.04 normal edition installed. I got aMule and Deluge (2 P2P programs). I was able to install them, to make them run as deamons and run them on startup. In fact, thoses programs can be acess thru http request. I want then to be ussed HTTPS request instead (I know that deluge can do that by internal options but prefer to configure only 1 SSL program for thoses 2 applications, plus another that will control a PHP script.
So I installed by Synaptic the only package Stunnel4.
I created 2 self-certificate (a .KEY and a .CRT files that I renamed for Stunnel).
This is that I got for Stunnel.conf (located at /usr/stunnel):
Quote:
; Sample stunnel configuration file by Michal Trojnara 2002-2006
; Some options used here may not be adequate for your particular configuration
; Please make sure you understand them (especially the effect of chroot jail)
; Certificate/key is needed in server mode and optional in client mode
cert = /etc/stunnel/server.crt.pem
key = /etc/stunnel/server.key.pem
; Protocol version (all, SSLv2, SSLv3, TLSv1)
sslVersion = SSLv3
; Some security enhancements for UNIX systems - comment them out on Win32
chroot = /var/lib/stunnel4/
setuid = stunnel4
setgid = stunnel4
; PID is created inside chroot jail
pid = /stunnel4.pid
; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
;compression = rle
; Workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS
; Authentication stuff
;verify = 2
; Don't forget to c_rehash CApath
; CApath is located inside chroot jail
;CApath = /certs
; It's often easier to use CAfile
;CAfile = /etc/stunnel/certs.pem
; Don't forget to c_rehash CRLpath
; CRLpath is located inside chroot jail
;CRLpath = /crls
; Alternatively you can use CRLfile
;CRLfile = /etc/stunnel/crls.pem
; Some debugging stuff useful for troubleshooting
;debug = 7
;output = /var/log/stunnel4/stunnel.log
; Use it for client mode
;client = yes
; Service-level configuration
[pop3s]
accept = 995
connect = 110
[imaps]
accept = 993
connect = 143
[ssmtp]
accept = 465
connect = 25
;[https]
;accept = 443
;connect = 80
;TIMEOUTclose = 0
[aMule]
accept = 40009
connect = 40010
TIMEOUTclose = 0
[deluge]
accept = 50009
connect = 50010
TIMEOUTclose = 0
; vim:ft=dosini
|
As you can see, I added at the end options for aMule and deluge.
Now, when I type:
http:\\192.168.1.7:40010 I enter Amule Web page
https:\\192.168.1.40009 DOES NOT WORK
http:\\192.168.1.7:50010 I enter deluge web page
https:\\192.168.1.7:50009 DOES NOT WORK
Others informations:
1) When I type stunnel4 in TERMINAL, promp return without error, but still does not work
2) When I type sudo stunnel4 and enter my password, it's the same thing as enter stunnel4, sill does not work.
3)Whnn I type /usr/bin/stunnel4, it's the same thing
4) files /etc/stunnel/server.crt.pem and etc/stunnel/server.key.pem does exist.
I need advice:
1) how to run it properly
2) how to put it on startup
3) where to look for more infos (log)
Thanks
Ricky00