Discussion:
Creating socket with socat
(too old to reply)
Parodper
2023-07-24 10:17:53 UTC
Permalink
I'm trying to make a remote socket local by using socat.
The idea would be

Remote: socket -socat-> TLS
Local: TLS -socat-> socket

When I run:

socat UNIX-LISTEN:remote.socket,unlink-early OPENSSL-CONNECT:remote..

on the local FreeBSD 13.2 machine, it appears to wait for connections,
but when I try to do nc -U remote.socket it fails with:

E setsockopt(7, 41, 27, {1}, 4): Invalid argument

The remote, for their part, doesn't even register the connection.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Felix Palmen
2023-07-24 13:34:36 UTC
Permalink
Post by Parodper
I'm trying to make a remote socket local by using socat.
[...]
E setsockopt(7, 41, 27, {1}, 4): Invalid argument
I'm not entirely sure I fully understand the scenario and the error. But
if your goal is to access some local unix domain socket on a remote
machine, I have my own pet tool for exactly that purpose here:
<https://github.com/Zirias/remusock>

Maybe you find it useful. The FreeBSD port linked there isn't really
polished, so far I didn't expect anyone would want to see that tool in
the official ports tree :)

Also, I hope I can release some update soon that would finally also
support a config file instead of entirely relying on command line
arguments.
--
Felix Palmen <***@FreeBSD.org> {private} ***@palmen-it.de
-- ports committer -- {web} http://palmen-it.de
{pgp public key} http://palmen-it.de/pub.txt
{pgp fingerprint} 6936 13D5 5BBF 4837 B212 3ACC 54AD E006 9879 F231
Loading...