Skip to content

Instantly share code, notes, and snippets.

@aidmax
Created August 11, 2022 09:47
Show Gist options
  • Save aidmax/0057df29484be3be31655f9df7f413ef to your computer and use it in GitHub Desktop.
Save aidmax/0057df29484be3be31655f9df7f413ef to your computer and use it in GitHub Desktop.
TCP reverse proxy
socat is one love 🖤
Need a TCP reverse proxy? This one-liner starts a TCP server on IP1:PORT1 that forwards all incoming conns to IP2:PORT2:
```
socat tcp-listen:8080,bind=0.0.0.0,reuseaddr,fork tcp:localhost:80
```
Super handy when you need to expose a private server quickly
Source: https://twitter.com/iximiuz/status/1557381051927994370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment