debian和centos系统socat网络端口转发 发表于 2022-12-07 更新于 2024-09-20 分类于 技术文章 安装软件包12345#CentOS系统yum install -y socat#Ubuntu或Debian系统apt-get updateapt-get install -y socat tcp端口转发123socat -d TCP4-LISTEN:8080,reuseaddr,fork TCP4:127.0.0.1:8080# 后台运行nohup socat TCP4-LISTEN:8080,reuseaddr,fork TCP4:127.0.0.1:8080 >> socat.log 2>&1 & udp端口转发123socat -T 600 UDP4-LISTEN:5353,reuseaddr,fork UDP4:114.114.114.114:53# 后台运行nohup socat -T 600 UDP4-LISTEN:5353,reuseaddr,fork UDP4:114.114.114.114:53 >> socat.log 2>&1 &