Linux开放防火墙端口

1、防火墙开放3306端口

powershell 复制代码
firewall-cmd --zone=public --add-port=3306/tcp --permanent

2、关闭防火墙

powershell 复制代码
service iptables stop

3、开启防火墙

powershell 复制代码
service iptables start

4、开机不自启防火墙

powershell 复制代码
chkconfig --del iptables

5、重启防火墙

powershell 复制代码
chkconfig iptables on

或者

powershell 复制代码
firewall-cmd --reload

重新关闭

powershell 复制代码
chkconfig iptables off

6、查看防火墙状态

powershell 复制代码
ervice iptables status  

7、查看已开启的端口

powershell 复制代码
firewall-cmd --list-ports
相关推荐
大哥您好6 小时前
QEMU 11.1.2 多架构编译指南(x86_64 / aarch64 / riscv64)
linux·服务器
jack186896 小时前
百度 AI 搜索实战:从精准获客到智能决策的应用全景
windows
道满科技7 小时前
Function Calling 参数总出错?只修参数就行
linux·windows·python
Gauss松鼠会7 小时前
高斯数据库(openGauss)的物理存储结构
运维·服务器·数据库·sql·opengauss·经验总结
Android系统攻城狮7 小时前
Linux Gstreamer深度解析之gst_audio_ring_buffer_prepare_read调用流程与实战(七十四)
linux·运维·服务器·gstreamer音视频·音视频进阶
杨云龙UP8 小时前
PostgreSQL 18.4 数据库整库迁移实战:pg_dump 备份与 pg_restore 恢复完整操作手册
运维·服务器·数据库·postgresql·pg_dump·pg_restore
GHN19878888 小时前
开源小工具按一下空格,什么都看见了
windows
我科绝伦(Huanhuan Zhou)8 小时前
Linux 通用压力测试脚本合集:磁盘 + 网络
linux·网络·压力测试
土星云SaturnCloud9 小时前
土星云智慧服务区方案:AI视觉+边缘计算+视频存管一体化的全场景智能化落地解析
服务器·人工智能·ai·边缘计算
Soneswy10 小时前
Linux系统篇--重定向与文件操作命令
linux