开启: chkconfig iptables on
关闭: chkconfig iptables off
开启: service iptables start
关闭: service iptables stop
vim /etc/sysconfig/iptables
添加想要开启的相关端口
-A INPUT -m state –state NEW -m tcp -p tcp –dport 6379 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 8080 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 8081 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 8082 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
service iptables restart
上一篇: 如何选择优质的香港服务器
下一篇: 宝塔面板彻底删除命令
© 2005-2023 Yiyou-Lens.com. All Rights Reserved. 网站地图