systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
yum install iptables-services #安装
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
service iptables save
systemctl restart iptables.service
systemctl enable iptables.service
【centos】将80端口的请求转发至8080端口(永久生效)
最新推荐文章于 2024-08-16 15:22:07 发布