centos7查看端口是否开放

 时间:2024-10-18 20:10:23

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添加用户并设置远程登录
  • 热门搜索
    人走茶凉什么意思 苟且是什么意思 真心话有什么问题 有什么网名 茶叶的作用 翻新机什么意思 气喘吁吁的意思 点缀的意思 kg代表什么单位 人情世故的意思