(related to Akamai message from before-- but I have better troubleshooting information).
I'm tying to route traffic through stunnel to a "cloud" based-endpoint. That endpoint has a static server name-- test.authorize.net. (This is the dev sandbox for auth.net).
But if you do an nslookup on test.authorize.net, you'll get back a different servername and IP, because it's so wonderfully "cloud".
Stunnel apparently tries to connect to the nslookup value. The server rejects the request because …
[View More]it can't route it back to test.authorize.net.
I've tried adding "delay = yes" and "sni = test.authorize.net", but neither work.
To see this in action, a simple setup with any accept, then connect to test.authorize.net:443 in client = yes mode.
This is what a valid response looks like (13 -- give me the darn merchant ID in a POST): https://test.authorize.net/gateway/transact.dll
This is what you'll get if you try to use stunnel (400 invalid url) : https://23.195.204.150/gateway/transact.dll
So how can I get stunnel to send the proper Request Header (host: test.authorize.net), make sure it's using http/1.1, etc?
[View Less]
Long ago I had a server with a bad network card. Every once in a while it
would spew uncontrollable bytes onto the network. If you open a stunnel
connection and it does that this could very well be the problem. If it
cheap, try changing the network card. If not, you should be able to look in
your firewall/router and it will tell you who is sending what bytes to
whomever. See if that machine is indeed streaming the bytes in massive
quantities. If not, I would suspect your stunnel is …
[View More]getting stuck in it's
own loop. There are a million reasons this can happen (well a few less than
a million) - such as maybe a bad library in the FreeBSD or a bad choice in
the Makefile - such as doing threads or something in a way your O/S does not
like (I use threads=fork or whatever it is, instead of actual threading).
You might tinker with some of the options that make the stunnel build and
try different ones. Especially if stunnel was compiled on a different
version of the O/S - could be differences in bytes in things and who knows
what.
That is all I can suggest beyond setting the debug level to 7 (I think is
highest) and then watching the log file.
Eric
From: stunnel-users [mailto:stunnel-users-bounces@stunnel.org] On Behalf Of
Murrey, Brian J.
Sent: Wednesday, October 17, 2018 10:57 AM
To: stunnel-users(a)stunnel.org
Subject: [stunnel-users] CPU 100%
We are running stunnel 5.49 on FreeBSD 11.2 and we're running into a problem
once in a while.
CPU pegs at 100% when we get an stunnel connection from one of our external
devices.
This affects 100% of all cores and we can't even log in to console.
To mitigate this temporarily, we have a script running in the background to
watch when stunnel begins to spike and restarts the daemon.
It doesn't happen 100% of the time, and so far I have been unable to
distinguish what makes the connection do this to the CPU.
Have any of you run in to this issue?
Sincerely,
Brian Murrey
System Engineer II, IT Infrastructure
_____
NOTICE: This message may contain privileged and confidential information
and/or protected health information intended solely for the use of the named
recipient and may be privileged or otherwise protected by law. If you are
not the intended recipient of this message, you should immediately notify
the sender and delete this message. Do not disseminate, reproduce, or review
this message or attachments if you are not the intended recipient. The
sender or others may have legal rights restricting the dissemination of the
information contained in this message and, as a result, remedies against you
in the event of the improper dissemination of confidential information,
trade secrets, personal information or privileged communications. This
message is the work of the sender and does not necessarily reflect the
position, views, or policies of TriMedx LLC or its affiliates.
WARNING: The integrity and security of this message cannot be guaranteed and
may contain or transmit a virus or other illicit code. Neither TriMedx LLC
or its affiliates accept liability for any damage attributable to viruses or
illicit code transmitted through this message or an attachment.
[View Less]
sorry to bother,
im trying to make older browsers be able to display TLS 1.1 and TLS 1.2 sites.
i heard stunnel cant be configured to always forward to the current
site address dynamically, thats why i would use privoxy.
the browser is configured to send to:
127.0.0.1 443
stunnel config has this at the end:
[Tunnel_in]
client = yes
accept = 127.0.0.1:443
connect = 127.0.0.1:8118
verifyChain = yes
CAfile = ca-certs.pem
checkHost = localhost
127.0.0.1:8118 is the privoxy address.
this is what …
[View More]stunnel writes:
LOG5[main]: Configuration successful
LOG5[0]: Service [Tunnel_in] accepted connection from 127.0.0.1:3261
LOG5[0]: s_connect: connected 127.0.0.1:8118
LOG5[0]: Service [Tunnel_in] connected remote server from 127.0.0.1:3262
and the browser infinitely loads, and never loads anything or leaves the page.
if i remove the last 3 lines, its the same just with this line added:
LOG4[main]: Service [Tunnel_in] needs authentication to prevent MITM attacks
but it doesnt give an error or anything.
with a configuration like:
[Tunnel_out]
client = no
accept = 127.0.0.1:443
connect = 127.0.0.1:8118
cert = stunnel.pem
this is what it gives:
LOG5[3]: Service [Tunnel_out] accepted connection from 127.0.0.1:3294
LOG3[3]: SSL_accept: 1407609B: error:1407609B:SSL
routines:SSL23_GET_CLIENT_HELLO:https proxy request
LOG5[3]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
and browser gives a server not found error immediately. im not even
sure if i should use client or server configuration in a case like
this, but none of them works anyway. all i would need is for my
browser to get the pages decrypted, or at least in less than TLS1.1.
like how on newipnow.com i can access sites with any encryption, since
they are sent to the browser without encryption. the browser just
gives an "unencrypted tunnel" warning, which is how i found stunnel,
and which is exactly what i need, just locally.
[View Less]
Hi,
Can you help me how to configure stunnel client to use TPM for mutual TLS authentication? I want to connect with mTLS to a remote server then make this connection available for localhost without mTLS.
Thanks for your help in advance!
Here is my configuration so far without TPM:
debug = debug
output = /tmp/stunnel.log
foreground = yes
[mtls_client]
client = yes
accept = 127.0.0.1:12019
sni = server-with-mtls.example.com
checkHost = server-with-mtls.example.com
connect = 1.2.3.4:443
…
[View More]verifyChain = yes
CApath = /etc/ssl/certs/
cert = client.crt
key = client.key
Thanks & br,
Gábor Nyíri,
[View Less]
First time user of Stunnel and I just wanted to check what I'm doing wrong.
I have two processes running: a TCP Listener that listens on port 13000 and a TCP client that sends it a message.
I'm running Stunnel on Windows 10 with the following config:
[myapp]
client = yes
accept = 13001
connect = 13000
cert = stunnel.pem
TIMEOUTclose=0
I updated the TCP client to send the message to port 13001 but when I check Wireshark I can still see the contents of the message in plaintext. Shouldn't I no …
[View More]longer be able to see the unencrypted contents of this message?
Here are the relevant logs:
2021.01.27 20:57:26 LOG7[main]: Found 1 ready file descriptor(s)
2021.01.27 20:57:26 LOG7[main]: FD=588 ifds=r-x ofds=r--
2021.01.27 20:57:26 LOG7[main]: FD=596 ifds=r-x ofds=---
2021.01.27 20:57:26 LOG7[main]: Service [myapp] accepted (FD=924) from 127.0.0.1:9322
2021.01.27 20:57:26 LOG7[main]: Creating a new thread
2021.01.27 20:57:26 LOG7[main]: New thread created
2021.01.27 20:57:26 LOG7[2]: Service [myapp] started
2021.01.27 20:57:26 LOG7[2]: Setting local socket options (FD=924)
2021.01.27 20:57:26 LOG7[2]: Option TCP_NODELAY set on local socket
2021.01.27 20:57:26 LOG5[2]: Service [myapp] accepted connection from 127.0.0.1:9322
2021.01.27 20:57:26 LOG6[2]: s_connect: connecting 127.0.0.1:13000
2021.01.27 20:57:26 LOG7[2]: s_connect: s_poll_wait 127.0.0.1:13000: waiting 10 seconds
2021.01.27 20:57:26 LOG7[2]: FD=940 ifds=rwx ofds=---
2021.01.27 20:57:26 LOG5[2]: s_connect: connected 127.0.0.1:13000
2021.01.27 20:57:26 LOG5[2]: Service [myapp] connected remote server from 127.0.0.1:9323
2021.01.27 20:57:26 LOG7[2]: Setting remote socket options (FD=940)
2021.01.27 20:57:26 LOG7[2]: Option TCP_NODELAY set on remote socket
2021.01.27 20:57:26 LOG7[2]: Remote descriptor (FD=940) initialized
2021.01.27 20:57:26 LOG6[2]: SNI: sending servername: localhost
2021.01.27 20:57:26 LOG6[2]: Peer certificate not required
2021.01.27 20:57:26 LOG7[2]: TLS state (connect): before SSL initialization
2021.01.27 20:57:26 LOG7[2]: Initializing application specific data for session authenticated
2021.01.27 20:57:26 LOG7[2]: TLS state (connect): SSLv3/TLS write client hello
[View Less]
Hi!
I'm wondering if it is possible to modify payload before it is encrypted?
I have a stunnel config which intercepts TLS.
I have the following config:
[server]
client = no
cert= /etc/stunnel/stunnel.pem
accept = 127.0.0.1:11010
connect = 127.0.0.1:12220
[client]
client = yes
accept = 127.0.0.1:12220
connect = remoteserver_ip:12222
So when posting TLS messages on port 11010 from my TLS-client on the same
server, I can connect to port 12220 using tcp-dump and read the payload
unencrypted.
…
[View More]Is it possible to alter the payload before it is sent? In that case any
pointers would
be appreciated , I have tried searching but it does not seem to be a common
use case. Would be great if I could tunnel it somewhere else and back
(external python program).
Thanks in advance,
S
[View Less]
Hi,
Using the latest build of S'tunnel getting this error when do systemctl
status stunnel4
can anyone shed some light on this please using Debian 9 as unable to get
Debian 10 work with Stunnel.
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508179]:
Possible memory
leak at ../ssl/packet_locl.h:385: 1021646 allocations
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508091]:
Possible memory
leak at ../ssl/packet_locl.h:385: 1021646 allocations
Jan 25 17:30:38 …
[View More]mobile-connection-server stunnel[16656]: LOG4[508179]:
Possible memory
leak at ../crypto/threads_pthread.c:21: 526301 allocations
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508091]:
Possible memory
leak at ../crypto/threads_pthread.c:21: 526301 allocations
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508170]:
Possible memory
leak at ../crypto/stack/stack.c:108: 1026780 allocations
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508170]:
Possible memory
leak at ../ssl/packet_locl.h:385: 1021646 allocations
Jan 25 17:30:38 mobile-connection-server stunnel[16656]: LOG4[508170]:
Possible memory
[View Less]
Hi there, a bit of background to start.
We are using SEE4C (from marshallsoft.com) for sending email from our
application, and have been for some time. We call various functions
from their see32.dll.
It has been sitting on the back-burner for some time, but now we must
implement TLS/SSL for outgoing mail.
MarshallSoft don't do TLS/SSL themselves, instead passing that
responsibility on to stunnel by way of an internal function
I have been reading MarshallSoft's doco and find …
[View More]that I have to
'install' stunnel and have it running in the background either as a
services or starting it when the user logs on (in the Startup group).
I also read in their doco regarding mapped drives:
MAPPED DRIVES
Beginning with Windows 10 update 1803, all executables (such as SEE
application programs, SEE32.DLL/SEE64.DLL, and Stunnel) must be loaded
from a local drive, not a mapped drive.
Unfortunately the requirement to install stunnel and inability to run
it from a mapped drive doesn't suit many of our clients installation
base.
Many of them run our application from a mapped drive.
I also don't want the overhead of installing stunnel on each workstation
that needs to send email or distribute and maintain configuration files.
I have enough work to do.
Can stunnel be called (started) on an ad-hoc basis and stopped again,
only when email is being sent?
I don't mean to whine, what options do I have, do our clients have?
Cheers,
Andrew
[View Less]