2018年3月31日

Centos查看端口占用情况和开启端口命令

摘要: Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1、开启端口(以80端口为例) 方法一: /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 写入修改 阅读全文

posted @ 2018-03-31 12:28 &大飞 阅读(221) 评论(0) 推荐(0) 编辑

centos配置firewall

摘要: 发现在CentOS 7上开放端口用iptables没效果(或者是sodino没找到正确的命令,传说Centos7 下默认的防火墙是 Firewall,替代了之前的 iptables)… 使用firewall-cmd开放端口则立即就生效了。见下操作: 1 2 3 4 5 6 7 firewall-cm 阅读全文

posted @ 2018-03-31 12:20 &大飞 阅读(80) 评论(0) 推荐(0) 编辑

导航