is there a benefit over socat?
Show HN: ip2unix – Turn IP sockets into Unix domain sockets
11–20 of 24 posts
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#12Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#13This is kinda awesome... Only request is a ptrace version, that will work on all binaries.
That's what I had in mind someday™. Unfortunately, this has to wait for version 4.x maybe :-/
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#14very interesting. A docker integration would be fun too (something like "docker run -p /tmp/socket:8080 ...") :)
I'm not very familiar with Docker, but wouldn't something like "docker run some_image ip2unix -r /tmp/socket:8080 ..." work?
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#15// "LD_PRELOAD" should've been in the submission title to avoid the "socat" questions
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#16Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#17Very nice! // "LD_PRELOAD" should've been in the submission title to avoid the "socat" questions
[1]: https://github.com/nixcloud/ip2unix/tree/d7d297ed68cdadc65dc...
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#18Do any programs get confused when they call getsockname() and the result is an AF_UNIX they weren't expecting?
Things are a bit trickier if it gets to getpeername(), since we want to have somewhat stable addresses. This is done by querying SO_PEERCRED and encoding[2] the pid for IPv4 or pid, uid and gid for IPv6 into the address.
In summary: Programs shouldn't get confused, but if they do, it's certainly a bug in ip2unix. Feel free to open an issue :-)
[1]: https://github.com/nixcloud/ip2unix/blob/d7d297ed68cdadc65dc...
[2]: https://github.com/nixcloud/ip2unix/blob/d7d297ed68cdadc65dc...
Re: Show HN: ip2unix – Turn IP sockets into Unix domain sockets
#19While listening on localhost is some level of security it still means that lateral movement is possible if one of the services is compromised. It also means that if I give give someone else a user account or similarly run any less trusted code then they can access all of the services without authentication.
I'm going to look into this an apply this so that these services aren't accessible by other users.