How can I test stunnel?
Asked Answered
S

2

7

I've created a conf file for a connection to an address and port for stunnel whose location is in /usr/local/etc/stunnel/ and started the stunnel service.

I've binded the address to my local ip address 127.0.0.1:60005

To test the connection, I've tried to connect the address via telnet with:

telnet 127.0.0.1 60005

Turns:

Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host.

I know that connection is not closed by foreign host as I tried telnet with the original ip address, there is no problem.

So, how can I test my stunnel connection except using telnet? Thanks.

Singletary answered 25/11, 2013 at 13:27 Comment(0)
B
3

One way to test it is to use tcpdump.

Try: tcpdump port 60005 -n -vvvv

Then send some data to that interface: echo "blah" > nc localhost 60005

You should see packets from tcpdump; if you do not see any packets try having tcpdump listen on a different interface with the -i switch.

Bellda answered 13/3, 2016 at 19:46 Comment(0)
N
0
tcpdump port 60005 -n -vvvv,
echo "blah" > nc localhost 60005**

showed me just what I needed to see. Only thing I had to do was change the port number.

Naiad answered 14/7, 2017 at 23:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.