Skip to content

Instantly share code, notes, and snippets.

@1901
Last active January 24, 2020 21:52
Show Gist options
  • Save 1901/53a57217b213aab22cfd60152a7f954b to your computer and use it in GitHub Desktop.
Save 1901/53a57217b213aab22cfd60152a7f954b to your computer and use it in GitHub Desktop.
[socat 端口转发] #linux #mysql #network
# install socat on CentOS 6.x
rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el6.rpm
yum install socat
# tcp
nohup socat TCP4-LISTEN:3306,reuseaddr,fork TCP4:192.168.1.2:3306 >> socat.log 2>&1 &!
# udp
nohup socat UDP4-LISTEN:1194,reuseaddr,fork UDP4:192.168.1.3:1194 >> socat.log 2>&1 &!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment