There is an HTTP service listening on port 127.0.0.1:5000
.
Your task is to make this service also available on 0.0.0.0:6000
.
You're not allowed to change the service configuration or restart it.
Hint 1 💡
socat
is a universal "relay" tool that can forward data between two arbitrary endpoints (files, pipes, sockets, etc.).
Hint 2 💡
In the socket-forwarding mode, socat
acts as a proxy server that accepts connections on one end and forwards data to a predefined destination on the other end.
Hint 3 💡
Knowing the main steps a typical socket server performs
to accept and process a connection will help you grasp the socat
port forwarding command syntax.
Level up your Server Side game — Join 8,400 engineers who receive insightful learning materials straight to their inbox