Linux系统对端口的开放管理一般有2种:

1.iptables

2.Firewalld
iptables不同的系统版本操作命名不同。我这边系统是centos 7.6。

查询端口列表:

iptables -L

查询命令列表:

iptables -h

新增开放80端口:

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

不需要重启,立即生效

Logo

更多推荐