Stunnel

From Discworld MUD Wiki
Jump to: navigation, search
Stunnel (“Secure Tunnel”) is a cross-platform application used to provide a universal TLS/SSL tunneling service.

It is a sort of proxy designed to add TLS encryption functionality to existing clients and servers without any changes in the programs' code. It is designed for security, portability, and scalability (including load-balancing), making it suitable for large deployments. It uses OpenSSL, and distributed under GNU GPL version 2 or later with OpenSSL exception.

Put another way, it allows you to connect your Mud client to a Mud through SSL encryption (if that mud provides a SSL port).

  • This makes it much harder to intercept your mud password and everything you type and see through your mud client as it is otherwise sent in the clear through the internet.

Installation

Configuration

Sample stunnel.conf configuration files for Discworld mud:

Encrypted but not secure

stunnel does not automatically validate server certificates for client connections. To encrypt data between your computer and the server, but still be susceptible to MITM attacks:

[Discworld]
client = yes
connect = discworld.starturtle.net:4245
accept = localhost:4245

Secure

On Windows stunnel cannot use the operating system's certificate store, so to have a truly secure connection you must:

  • Export/save the certificate chain starting from the parent certificate of discworld.starturtle.net (currently labelled R10) and including it's signing root CA (currently labelled ISRG Root X1). Make sure to select the option that exports the whole chain to the root certificate in Base64-encoded ASCII and save the file as dwcachain.crt and move it to the location of the stunnel binary.
  • Use the following configuration:
[Discworld]
client = yes
accept = localhost:4245
connect = discworld.starturtle.net:4245
CAfile = dwcachain.crt
verifyChain = yes
checkHost = discworld.starturtle.net

Note: Every time the discworld server changes who issues its certificates, the certifying authority changes the certificate chain path or any of the certificate authorities' certificates expire (currently slated for March 2027) you will have to manually update the certificate chain.

Running

  • Windows: Clicking on the executable with the OpenSSL DLLs and the stunnel.conf in the same directory should work.
  • Linux manually: stunnel stunnel.conf (adjust to path of stunnel.conf if not in the current directory)
  • Linux systemd: service stunnel4 start (by default should use config file /etc/stunnel/stunnel.conf)

MUSHclient

The following page contains information to prepare and start Stunnel with Mushclient on windows to connect with SSL.

You can follow the steps on the page linked above to download stunnel and install it, you can use the following configuation information for Discworld mud:

Then in Mushclient you can edit your world information (Alt+1) to connect to the TCP/IP Address: localhost and Port 4245.


If the connection doesn't work it probably means stunnel is not currently running.

  • You can setup stunnel to start with your computer or start it manually.

Alternatives

The MUSHclient author suggests using the TorBrowser as a proxy instead of Stunnel.

See : https://www.mushclient.com/forum/?id=14780&reply=21

See also