rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ~GeeS~

Pages: 1 2 3 4 ... 18
16
HTML & templates / Re: adding sound to clickables
« on: July 13, 2007, 06:43:37 PM »
Because of that whistle and bells preferred by webmaster and some other reasons I've switched javascript off and don't use it in webpages ... so flame me now!

17
Beta / Re: Testing build #117
« on: July 11, 2007, 06:12:17 PM »
just passing by ... not much time anymore.
The old look is much more intuitive. just my 2 cents.

18
HFS ~ HTTP File Server / Re: Trouble connecting HFS thru Stunnel
« on: June 08, 2007, 06:23:43 AM »
Nice to hear that your Stunnel/HFS is working now!
But I've still some comments:

- In the tutorial i've not given instructions on how to configure routers and firewalls on purpose because every configuration is different and it would be much more confusing to discuss every possible configuration. A user who uses a router and/or a firewall should know what (s)he is doing.
I still do not understand why you are using a firewall in your router anda firewall in your machine.

- In your comments you suggest the combo https://127.0.0.1:443 (Stunnel) forwarding to http://127.0.0.1:80 (HFS). This is not my intended combo! Stunnel should forward to a port different to 80 (default Http) like 44300, which also should not be accesible from the outside, because otherwise stunnel could be bypassed! Port 80 could be used for a second instance of HFS for standard, non-encrypted http-server.

But there are many ways to skin a cat ... and you are free to do it as you like.

19
HFS ~ HTTP File Server / Re: Trouble connecting HFS thru Stunnel
« on: June 07, 2007, 07:38:26 PM »
Just passing by ...
... This is how mine and others are set up and are running without issue. ...
I'm glad that my manual is still working fine. I've triple-checked it in the past on several occasions with setups from scratch ... and sometimes i forget the procedure myself.
Instead from the wiki you could also follow the instructions from the original thread at http://www.rejetto.com/forum/index.php?topic=3083.45 because it easier to read.

So https://127.0.0.1:443 (Stunnel) is responsive, but forwarding to http://127.0.0.1:44300 (HFS) does not respond or refuses connection.
My suggestion:
Does http://127.0.0.1:44300 (HFS) respond? It should, because no Stunnel involved.
Try to use a fresh version of HFS, disable any limits, bans, referrer etc .
If you use a firewall on 127.0.0.1 switch it off completely for testing.
Do you use some caching or webfiltering software like proxomitron etc., switch it off for testing.
Your OS?
It does work, just try harder! good luck!
BTW IP numbers in front of the ports in the stunnel scripts were implemented in the Stunnelversion mentioned in the manual e.g. 0.0.0.0:80 = all on port 80


20
HFS ~ HTTP File Server / Re: HFS+Ubuntu7.04+wine=Happy user :-)
« on: May 15, 2007, 04:00:58 PM »
Thank you LeDuFe!

21
HFS ~ HTTP File Server / Re: Thinking of HFS 3
« on: April 20, 2007, 08:08:15 PM »
These days i'm thinking of HFS 3.
Maybe it will be a full rewrite, from scratch. ... I'm considering to write it using python. It would add a lot of power, but i have to find an easy way to get an executable.
This sounds great! From what i've learned from http://www.python.org/about/ , even I would then be able to understand the source  ;) ... and does it mean that HFS3 would be a multiplatform application and OS independant?  :) Which Win32 compiler do you consider or are you still searching?

... I know many of you will ask new features that has nothing to do with the changes i'm talking about. It's not easy for me to explain what's related and what's not. ...
Maybe very obvious, but may I propose to reject all feature requests on HFS2 from now on and only fix bugs to keep HFS2 as a stable version as long as HFS3 will be in beta?

... I already planned these things
  • options in dialog instead of menu
  • have a single folder type instead of reals and virtuals
  • multilanguage
...
I guess nobody will complain on the second and third of above. But what is meant by options in dialog?

Additionally, please consider the following in order of importance:

1. One rar/zip-file to download containing the executable plus the ini, tpl and multi-languagefile(s).

2. Registry entries as option only.
(The actual first time execution of HFS2 saves to registry on exit by default. This is annoying with testing new versions, I often forget to save to file and have to clean the registry or run uninstall.)
2. Please keep the multi-instances of HFS (very useful for different HFS's on different ports eg. in combination with Stunnel).

3. An improved GUI (which should be the main target for version 3 imho) with tabs for eg "Configuration" and "Help &Troubleshooting". Remove Easy/Expert, its confusing and doesn't help.
The configuration tab would open a new window with logical ordered tabs like eg. Clients, Template, Limits, Logs ... with check marks and radio buttons and Apply, Save and Cancel buttons.

4. Some cosmetic changes on naming of the variables in the tpl for better remembering and faster typing.

5. A new & more attractive default template to reflect the new version.

... HFS is almost perfect, so keep it simple, small, fast and secure.



22
HFS ~ HTTP File Server / Re: HFS on the c't computermagazin !
« on: April 11, 2007, 07:17:08 PM »

23
HFS ~ HTTP File Server / Re: How about SSL support
« on: April 04, 2007, 05:46:06 PM »
why don't publish this thing also on the wiki?
on the forum it may get lost in the future.
I tried, but formatting the code and lay-out is horrifying. Tools? Help?
Has already been done. HTML!

24
HFS ~ HTTP File Server / Re: How about SSL support
« on: April 03, 2007, 09:25:50 PM »
I'll also include the SSL Bug options and turn on compression in the config.
As i said: No guarantees whatsoever!  ;)

25
HFS ~ HTTP File Server / Re: How about SSL support
« on: April 03, 2007, 08:45:10 PM »
why don't publish this thing also on the wiki?
on the forum it may get lost in the future.
I tried, but formatting the code and lay-out is horrifying. Tools? Help?

The only thing I would add is that the latest version of openSSL is 0.9.8e (dated Feb 23, 2007).  I installed it yesterday.  ( http://www.openssl.org/ )
The Stunnel 4.20 binaries were compiled with the older version of openssl. Did not want to take any risk with openssl.exe from a newer version.
In the config you show:
; SSL bug options / NO SSL:v2 (SSLv3 and TLSv1 is enabled)
options = ALL
options = NO_SSLv2
I don't have this entry.  Is it necessary?
Got this entries from the openssl manual http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html# and discussions on the stunnel mailarchive:
options = all is a collection of workarounds for bugs in several older browsers
NO_SSLv2 disables SSL version2 options are:ALL|NO_SSLv2|NO_SSLv3|TLSv1
Also, I don't use compression.  Maybe I should.  Does it speed things up a bit?
It should, i measured DL of 3500KB/s on localhost on xp sp2 centrino 1.6Mhz. Seems enough.
It's very difficult to find good info about all the options, but it works flawlessly.  :)


26
HFS ~ HTTP File Server / Re: How about SSL support
« on: April 03, 2007, 06:48:20 PM »
I've reviewed the earlier description of HFS with Stunnel, applied some changes for convenience and added some more thoughts. Here we go:

Easy & secure data sharing on Windoze with HFS & Stunnel for free ... an essay

The opportunity:
Today’s widespread cable- and ADSL internet access offers a permanent connection to the worldwide web for home users. External hosting to serve private web pages or to share files is not necessary anymore.   
HFS is a free, opensource http-file/web server for the win32 platform (windoze), it's very easy to use and runs "right out-of-the box" for down- and uploading files as well as for serving web pages directly from a PC at home. It can even travel on a disk or pendrive to serve from any PC at hand and addressable from the Net (keyword: portforwarding) or within a network.

The risk:
All web servers (not only HFS), which use HTTP, have a common weakness:
HTTP-traffic is transmitted in plain text and every bit of data travelling between a web server and a client (browser) can be intercepted and read by everyone who is in the chain passing data to the final destination. Even encoded usernames and passwords, which should protect web servers against unauthorized access, are easy to reveal. Only encrypted traffic (HTTPS) between server and client can protect precious private data against sniffing.
By encrypting the traffic between a server and its clients, a sniffer still is able to see which client IP is exchanging data with a certain web server at a certain time, but it is practically impossible (as long as the sniffer does not have the randomly generated private key) to decrypt the transmitted data.
While most modern browsers can handle encrypted traffic, the HFS server only supports insecure HTTP.

The solution:
Stunnel - a free, opensource multiplatform SSL tunneling proxyprogram- "is designed to work as an SSL encryption wrapper between remote client and local (inetd-startable) or remote server. It can be used to add SSL functionality to commonly used inetd daemons like POP2, POP3, and IMAP servers without any changes in the programs' code. Stunnel uses OpenSSL or SSLeay libraries for cryptography ..."
This just means, that Stunnel will be used to accept the client requests and establish an encrypted (HTTPS) connection, while Stunnel and the HFS server are exchanging non-encrypted data (HTTP).
A typical configuration of a PC with an https-enabled HFS server:
- Stunnel accepts requests from any IP on port 443, the HTTPS default port.
- Stunnel connects to HFS on an arbitrary chosen free port (e.g. 44300).
- HFS accepts requests on the chosen port, in this example 44300.
- Direct requests from clients to HFS on port 44300 have been blocked, except from 127.0.0.1 (localhost), where Stunnel resides.
- The PC and drives where HFS, Stunnel and the data reside are secured against unauthorized access.

How-to setup Stunnel for a SSL-secured HFS server, create a privatekey and self-signed server certificate:

1. Stunnel is available from http://stunnel.mirt.net as a precompiled binary for windoze: “stunnel-4.20-installer.exe” at the time of writing. Install it and you will end up with:
- stunnel.exe  (= the Stunnel program)
- stunnel.html (= the Stunnel manual)
- stunnel.conf (= the Stunnel configuration file)
- zlib1.dll, libssl32.dll and libeay32.dll (= openssl library files)
- stunnel.pem (= the default privatekey/certificate file)

Note: to get rid of the registry entries made by the installer, save the above files and deinstall Stunnel.

2. Run “stunnel.exe” and open the log. Find the version of openssl used for compiling with stunnel: “0.9.8d” at the time of writing.
Extract this version of “openssl.exe” from “openssl.zip” or download it directly to your Stunnel directory from http://www.openssl.org or http://stunnel.mirt.net (.../openssl/binary-0.9.8d-zdll/openssl.exe).

3. Open a text editor (e.g. notepad) and copy/paste the following entries:
Quote
[req ]
default_bits = 2048
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type

[ req_dn ]
countryName = Country Name (2 letter code)
countryName_default  = XX
stateOrProvinceName = State or Province Name (full name)
localityName = Locality Name (eg, city)
0.organizationName = Organization Name (eg, company)
organizationalUnitName = Organizational Unit Name (eg, section)
0.commonName = Common Name (FQDN of your server)

[ cert_type ]
nsCertType = server
Save this file as “pem.conf” in the stunnel directory.

4. Delete the “stunnel.pem”, which contains a default server certificate and privatekey.
It is a bad idea to use the stunnel.pem file shipped with stunnel except for testing!
In order to produce pem-file with a unique secure private key / server certificate, open a text editor (e.g. notepad) and copy/paste the following entries:
Quote
openssl.exe req -new -x509 -days 3650 -nodes -config pem.conf -out stunnel.pem -keyout stunnel.pem
Save this file as “create_pem.bat” in the stunnel directory. Run “create_pem.bat”,
answer the questions in the dialog and enter whatever you like.

Note: The Common Name (FQDN) is required and should be the hostname of the machine running stunnel e.g. www.myhomeserver.net.
If you can access the machine by more than one hostname some SSL clients will warn you that the certificate is being used on the wrong host, so it's best to have this match the hostname users will be accessing.


Each time you run “create_pem.bat”, a new “stunnel.pem” file with a unique random private key and self assigned server certificate with 10 years validity will be created.
It is extremely important to keep this stunnel.pem file secret! It contains your private key for the encrypted traffic! Do not back-up, but create a new one if necessary.

5. Edit “stunnel.conf” with a text editor and to obtain the following content:
Quote
; Lines preceded with a “;” are comments
; Empty lines are ignored
; For more options and details: see the manual (stunnel.html)
 
; File with certificate and private key
cert = stunnel.pem
key = stunnel.pem

; Log (1= minimal, 5=recommended, 7=all) and log file)
; Preceed with a “;” to disable logging
debug = 5
output = stunnel.log

; Some performance tuning
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

; Data compression algorithm: zlib or rle
 compression = zlib

; SSL bug options / NO SSL:v2 (SSLv3 and TLSv1 is enabled)
options = ALL
options = NO_SSLv2

; Service-level configuration
; Stunnel listens to port 443 (HTTPS) to any IP
; and connects to port 44300 (HFS) on localhost
[https]
accept  = 0.0.0.0:443
connect = 127.0.0.1:44300
TIMEOUTclose = 0
Save the edited “stunnel.conf”.

6. Stunnel is now configured to accept HTTPS requests from any IP on port 443 of your PC and connects with HTTP to port 44300 on the same PC (127.0.0.1).
Do not forget: Port 443 and 44300 on this PC have to be opened in a firewall and routers have to forward port 443 to your PC. Do not forward port 44300 on your router.

7. Start HFS (2.1d at the time of writing) to listen on port 44300.
In Menu/Limits/Bans…, enter “\127.0.0.1” without the quotation marks and check “Disconnect with no reply”  in order to ban every IP except 127.0.0.1 to block direct http access to HFS with a “Host not found” message.
Within a “friendly” network you could consider to add e.g. “\192.168.*” to allow direct HTTP access to HFS from all machines in your network.

8. Test your configuration carefully. You might to want to change the debug mode to debug = 7 in the stunnel.conf file for more log details.

9. Additionally, you might want  also to have an HTTP welcome page, which links to your HTTPS enabled pages and contains instructions for your visitors how to handle a self signed server certificate and the related error messages of some browsers with it: Run a second, independent instance of HFS on port 80, modify the template and link from there to your secure Stunnel-HFS server.
 
10. Optionally, you can put your data, Stunnel and HFS on a pendrive with e.g.  ./Myserver/Stunnel/stunnel.exe…, ./Myserver/HFS443/hfs443.exe…, ./Myserver/HFS44300/hfs44300.exe…, ./Myserver/Filesystem/… (renamed the two “hfs.exe” for convenience).
Configure HFS to save on file and the registry will kept clean. No admin rights are required. Run stunnel.exe, hfs443.exe and hfs44300.exe on any PC in a network for secure data exchange from PC to PC.
Note: Works fine, even in “hostile” networks. You could even rename the executables to some “innocent” names like “excel.exe”, “powerpnt.exe” or “winword.exe” to obfuscate the running processes. Windoze will not complain running different processes with the same name. Use your imagination and be aware of the risks!

11. Visit also http://stunnel.mirt.net, http://www.stunnel.org , http://www.openssl.org and http://www.rejetto.com for further readings.
 
Some important notes:

Because Stunnel connects from 127.0.0.1 (localhost) to HFS, functions of HFS which deal with IP numbers will be influenced.

# Logs will will only show one client:127.0.0.1 (Stunnel on localhost). Use the Stunnel logs additionally to find out the requesting IP addresses.

# Limits (bans, speed, number of simultaneous downloads …) will have influence on one IP only: 127.0.0.1 (Stunnel on localhost). Keep that in mind!

# The ~progress window will show the actual total transfers of all clients (again: 127.0.01) Nice new feature, but also a privacy risk: the filenames of your data will be revealed. Either disable the progress-template (any decent browser has already a comparable window) or protect the server with a password to inhibit the use of the ~progress command for unauthorized clients.

# Do not link parts of your pages to external, insecure (HTTP) servers. It is annoying and makes your site less trustful.

# Data transfer will be somewhat slower, due to the de- and encryption of the data, but evidently the bandwith of the connection will be in most cases the limiting factor.

# Finally, never ever share your Stunnel or HFS directories and take special care to protect them against unauthorized access … and keep your private key private.

So, enjoy secure serving and exchanging data. The more you give, the more you get

~GeeS~ Copyleft 4/2007 Share if you like.

Some small print:
Unfortunately in some countries encryption or the discussion of encryption is still considered illegal.
In some countries the free exchange of data is still considered illegal under certain conditions.
I’m not a lawyer; in case of doubt get professional advice.
These publication is based on my today’s best knowledge and reflect only a small part of the plenty more options of Openssl, Stunnel and HFS. No guarantees or whatsoever.




27
HFS ~ HTTP File Server / Re: How about SSL support
« on: April 02, 2007, 07:57:45 PM »
Please change debug to debug = 7 in your stunnel.conf and publish again please.

Did I understand well and has your stunnel.conf the entry

[https]
accept = 8245
connect = same portnumber as HFS???

If yhat is true, then your URL should be https://grapeape.myftp.org:8245 because you have to add the portnumber if you use a non-default port for https.
Or did you forward port 8245 or blocked it with your firewall?
Try port 443 (https default) for stunnel to accept, connect to 44300, do not block these ports and forward 443 only. HFS listens to 44300.

Before I read your post I just finished an update on HFS with Stunnel. Will publish within some days. No time yet. Good luck.
If it still does not work, please publish your logs and portnumbers for debugging.

28
HFS ~ HTTP File Server / Re: How about SSL support
« on: March 30, 2007, 05:05:47 PM »
Yes I did try that and to no avail it says nothing is on that page like nothing is lestening there.
I just followed my procedure as described earlier in this thread ( and updated to stunnel 4.20).
Everything works fine! Even download speed with stunnel is still high enough (tested on localhost) : 3500kB/s.
Try again!

29
I wanna only one IP to have no access in one folder.
If this one IP was mine, I would just use a proxy to get access. Request does not make sense to me, too.

30
Everything else / Re: just graduated
« on: March 23, 2007, 07:47:25 PM »
    CONGRATULATIONS ...
... and thank you for this valuable piece of free & opensource software!

What's next? PhD on HFS3 or going "commercial"?

Anyway, take a break and have a party!

Pages: 1 2 3 4 ... 18