Lead Image © Petr Vaclavek, 123RF.com

Lead Image © Petr Vaclavek, 123RF.com

Secure your data channel with stunnel

Confidential

Article from ADMIN 56/2020
By
Stunnel provides a TLS wrapper with extensive configuration options to secure your data over insecure wireless networks.

Transmitting confidential data over an insecure connection is not a good idea and should always be avoided, but what do you do if a service does not offer a secure communication channel, and no VPN is available?

Everyone will be familiar with the following situation: You are sitting comfortably in a cafe or hotel, registered on the local WiFi network, and happily browsing the Internet. However, you might not want other users of the same wireless network to be able to track your Internet usage behavior. Worse still, you come across a service that requires you to enter sensitive data, such as login credentials, but does not provide data protection through a secure TLS connection. Unfortunately, such cases can still be found in 2020. So what now?

Most Linux distributions offer the stunnel package, a TLS wrapper that lets you build a tunnel between two endpoints. The tool can operate in both client and server modes.

Preparing the Tunnel

After you have downloaded and installed the stunnel package from the distribution repository [1], you need to install the /etc/stunnel/stunnel.conf configuration file. If this is not available, sample configurations can usually be found in the documentation directory, /usr/share/doc/stunnel*/. The example in Listing 1 shows a very simple configuration that uses stunnel as a plain vanilla TLS client.

Listing 1

Stunnel as a TLS Client

; global settings
sslVersion = TLSv1.2
chroot = /var/run/stunnel
setuid = nobody
setgid = nobody
pid = /stunnel.pid
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
CAfile = /etc/pki/tls/certs/roots.pem
verifyChain = yes
   
[gmail-smtp]
client =

...

Use one of the options below to read the full article

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

Related content

  • Security first with the Hiawatha web server
    The small but secure Hiawatha web server provides an appealing alternative to the complex Apache and other alternatives.
  • Transport Encryption with DANE and DNSSEC
    Those who think that enabling STARTTLS in the mail client will make their mail traffic more secure are wrong. Only those who bank on DANE can be sure that a mail server or a firewall will not switch off encryption in transit.
  • Remote maintenance and automation with RPort
    Firewalls and network address translation often stand in the way of access to remote systems, but the free RPort software works around these obstacles and supports remote maintenance through a tunnel locally, in the cloud, and from your home office.
  • State-of-the-art virtual private networks
    Because Microsoft's legacy VPN protocol, PPTP, has a couple of vulnerabilities, SSTP, which routes data via an SSL connection, was introduced as the new VPN protocol with Vista, Windows Server 2008, and Windows 7.
  • Verifying TLS Certificates
    The certigo utility checks the certificate chain, and the command-line output tells you who issued which certificates when, pointing out any ambiguities.
comments powered by Disqus