How can I check stunnel?

I created a conf file to connect to the address and port for stunnel, whose location is in / usr / local / etc / stunnel / and started the stunnel service.

I bound the address to the local ip address 127.0.0.1:60005

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

telnet 127.0.0.1 60005

Includes:

Trying 127.0.0.1 ... Connected to 127.0.0.1. The escape character is "^]". The connection is closed by the external host.

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

So how can I test my stunnel connection other than using telnet? Thanks.

+6
source share
2 answers

One way to verify this is to use tcpdump .

Try: tcpdump port 60005 -n -vvvv

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

You should see packages from tcpdump ; if you do not see any packets, try tcpdump listen on another interface with the -i switch.

+2
source
 tcpdump port 60005 -n -vvvv, echo "blah" > nc localhost 60005** 

showed me what I needed to see. The only thing I needed to do was change the port number.

0
source

Source: https://habr.com/ru/post/958775/


All Articles