On Tue, Dec 12, 2023 at 12:55:07PM -0000, Esteban Gil wrote:
When I connect the first client it works as expected, my issue is with the second one.
In the server log everything seems fine, you can see that both clients connect succesfully: /------------------------------------------------------------------------------------------------------------/
[snip]
2023.12.12 13:50:18 LOG5[0]: Service [checker] connected remote server from 127.0.0.1:36492 <------------------------------------- 2023.12.12 13:50:29 LOG5[1]: Service [checker] accepted connection from 192.168.100.105:49692 2023.12.12 13:50:29 LOG5[1]: Service [checker] connected remote server from 127.0.0.1:52356 <------------------------------------- /------------------------------------------------------------------------------------------------------------/
however when I try to send some data (using netcat) only the first connected client is able to send or recieve. I have netcat listening on the server target port and I can only see the messages sent from the first client.
Right. I think the use of netcat may be your problem. The netcat tool is not really as universal as we might want it to be :) It does *not* handle simultaneous connections; it waits for the first connection to end and only then will it pay any attention to the second one.
Can you try using another program, one that is designed to accept and process simultaneous connections, like e.g. something like this socat invocation that tells it to listen on port 8088, fork a new child process to handle each incoming connection, and then execute "cat" to echo stuff?
socat TCP4-LISTEN:8088,fork EXEC:cat
Hope this helps!
G'luck, Peter