Centos7 open ports

open port
 
firewall-cmd --zone=public --add-port=80/tcp --permanent
 
Command meaning:
 
--zone #scope
 
--add-port=80/tcp #Add port, the format is: port/communication protocol
 
--permanent #Permanent effect, invalid after restart without this parameter
 
restart firewall
 
firewall-cmd --reload

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326261430&siteId=291194637