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
相关推荐
QC班长3 小时前
Maven公司私库配置踩坑点
java·服务器·maven·intellij-idea
AC赳赳老秦4 小时前
OpenClaw二次开发实战:编写专属办公自动化技能,适配个性化需求
linux·javascript·人工智能·python·django·测试用例·openclaw
mounter6255 小时前
【内核新动向】告别物理槽位束缚:深度解析 Linux Virtual Swap Space 机制
linux·内存管理·kernel·swap·virtual swap
handler015 小时前
从零实现自动化构建:Linux Makefile 完全指南
linux·c++·笔记·学习·自动化
武藤一雄6 小时前
19个核心算法(C#版)
数据结构·windows·算法·c#·排序算法·.net·.netcore
2023自学中6 小时前
i.MX6ULL 板子的完整启动流程图(从上电 → 用户空间)
linux·嵌入式
闫利朋6 小时前
Ubuntu 24.04 桌面安装向日葵完整指南
linux·运维·ubuntu
mfxcyh7 小时前
使用MobaXterm配置nginx
java·服务器·nginx
YSF2017_37 小时前
C语言16-makefile(3)——makefile的模式规则
linux·c语言·开发语言
pengyi8710158 小时前
动态IP池快速更换实操方案,5分钟完成IP替换
服务器·网络·tcp/ip