Skip to content

Instantly share code, notes, and snippets.

@lotusirous
Created December 27, 2017 07:52
Show Gist options
  • Save lotusirous/1bf9ef91174723ec482f799e3984a88a to your computer and use it in GitHub Desktop.
Save lotusirous/1bf9ef91174723ec482f799e3984a88a to your computer and use it in GitHub Desktop.

Forward localhost service by a public ip

I have a service that listen on http://127.0.0.1:1017. This service is a binary file which can not change IP/port when turn it on.

socat for public this service by ip

socat TCP-LISTEN:8080,fork,reuseaddr TCP:127.0.0.1:1017

Now, this service is published on ip 0.0.0.0:8080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment