Created
April 25, 2017 11:21
-
-
Save clairton/b24068dfafc53dbdcbf941b9a24618d8 to your computer and use it in GitHub Desktop.
redirect port without iptables or firewalld
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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