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
相关推荐
_w_z_j_21 小时前
Linux----mmap
linux
程序员zgh1 天前
Linux系统常用命令集合
linux·运维·服务器·c语言·开发语言·c++
Bigan(安)1 天前
【奶茶Beta专项】【LVGL9.4源码分析】09-core-obj_class对象类系统
linux·c语言·mcu·arm·unix
紫郢剑侠1 天前
飞秋@Windows +iptux@Linux,打造内网跨平台IM环境
linux·运维·服务器·im·qq
陈小于1 天前
windows(x86-x64)下编译JCEF
windows
保持低旋律节奏1 天前
linux——调试
linux·运维·服务器
牛奶咖啡131 天前
Linux系统故障排查思路实践教程(下)
linux·运维·服务器·su命令切换用户问题解决·文件打开过多问题解决·linux网络故障问题解决·linux故障排查思路
coder4_1 天前
Linux 数据同步全攻略:NFS 共享、inotify+rsync 与 sersync 实战指南
linux·rsync·文件共享·nfs·数据同步·inotify·实时备份
Lynnxiaowen1 天前
今天我们继续学习kubernetes内容Helm
linux·学习·容器·kubernetes·云计算