Skip to content

Instantly share code, notes, and snippets.

@clairton
Created April 25, 2017 11:21
Show Gist options
  • Save clairton/b24068dfafc53dbdcbf941b9a24618d8 to your computer and use it in GitHub Desktop.
Save clairton/b24068dfafc53dbdcbf941b9a24618d8 to your computer and use it in GitHub Desktop.
redirect port without iptables or firewalld
yum install socat
vi /etc/systemd/system/socat.service
#/etc/systemd/system/socat.service
[Service]
ExecStart=/usr/bin/socat -u TCP-LISTEN:80,fork TCP:localhost:8081
systemctl enable socat
systemctl start socat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment