FMeinicke's Wiki

Home

❯

Linux

❯

Forward a localhost only port to a public port

Forward a localhost-only port to a public port

May 26, 20251 min read

  • socat/tcp-listen

tcp-listen

Source

  • https://unix.stackexchange.com/a/187038/482223
  • use socat to create a tunnel from the localhost-only port to another port that is then publicly accessible
socat tcp-listen:<public port>,reuseaddr,fork tcp:localhost:<localhost-only port>

Graph View

Created with Quartz v4.5.0 © 2025

  • GitHub