Skip to content

Instantly share code, notes, and snippets.

@alexalouit
Created October 21, 2020 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexalouit/8aef6fcf599db47aa89eac59554354c5 to your computer and use it in GitHub Desktop.
Save alexalouit/8aef6fcf599db47aa89eac59554354c5 to your computer and use it in GitHub Desktop.
redirect port (exemple tcp local 80 to 8080)
$ socat TCP-LISTEN:80,fork TCP:127.0.0.1:8080"
# crontab:
# 0 * * * * flock -n /var/run/tcp.80.8080.lock -c "socat TCP-LISTEN:80,fork TCP:127.0.0.1:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment