centos7查看端口是否开放

 时间:2026-04-23 00:32:19

1、centos7中的防火墙改成了firewall,使用iptables无作用,开放端口的方法如下:

firewall-cmd --zone=public --add-port=80/tcp --permanent

返回success为成功

centos7查看端口是否开放

2、命令含义: 

--zone #作用域 

--add-port=80/tcp #添加端口,格式为:端口/通讯协议 

--permanent #永久生效

centos7查看端口是否开放

3、重启防火墙:

systemctl restart firewalld.service 

centos7查看端口是否开放

4、关闭防火墙:

systemctl stop firewalld.service 

centos7查看端口是否开放

5、查看监听(Listen)的端口

netstat -lntp

centos7查看端口是否开放

6、查看监听(Listen)的端口

netstat -lntp

检查端口被哪个进程占用

netstat -lnp|grep 8080

centos7查看端口是否开放

  • Windows 2003 中没有“本地用户和组
  • Windows Server 2012 R2如何启用组策略对象链接
  • 用U盘安装Centos系统
  • Win Server 2012添加用户并设置远程登录
  • 解决linux系统CentOS下调整home和根分区大小
  • 热门搜索
    四川旅游网站 浙江旅游地图 春秋旅游团 北京自助旅游 襄樊旅游 山东旅游职业学院官网 台湾岛旅游网 斯洛伐克旅游 枣庄旅游景点大全 西岭雪山旅游