Stream: nixos

Topic: ✔ Weird behavior in socat


view this post on Zulip majorkaks (Mar 03 2024 at 05:21):

I started python -m http.server -b 127.0.0.1 8193
and ran socat TCP6-LISTEN:8192,reuseaddr,fork TCP:127.0.0.1:8193 to forward all IPv6 incoming traffic at [::1]:8192 to 127.0.0.1:8193
But I can even get the data using curl 127.0.0.1:8192

Can someone please explain? I tried asking GPT-3.5 and Gemini, but didn't get any satisfactory answer.
netstat -tulpn output

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 :::8192                 :::*                    LISTEN      7448/socat

view this post on Zulip majorkaks (Mar 03 2024 at 05:22):

My final goal is to use this to allow playing games which support IPv4 over IPv6.

view this post on Zulip Shivaraj B H (Mar 05 2024 at 18:07):

What’s the result of running curl on your ipv6 loopback on port 8192? Do you still get the response?

view this post on Zulip majorkaks (Mar 06 2024 at 09:33):

Yeah, curl http://[::1]:8192 works as expected.

view this post on Zulip majorkaks (Mar 06 2024 at 09:37):

Ah nvm, figured it out on RTFM.
socat TCP6-LISTEN:8192,reuseaddr,fork,ipv6only TCP:127.0.0.1:8193 works as expected in IPv6 only mode
image.png

view this post on Zulip majorkaks (Mar 16 2024 at 23:38):

trying to mark the stream resolved

Please resolve this stream.

view this post on Zulip Notification Bot (Mar 17 2024 at 11:06):

Srid has marked this topic as resolved.


Last updated: Nov 15 2024 at 13:04 UTC