question:
After Alibaba Cloud opened a new port on the web page and restarted the firewall, the port was not started and all the previously configured ones were stopped.
solve:
The reason may be that Alibaba's service is controlled and only ports can be opened one by one. Also enable the newly configured new ports individually.
Open port 80 command
firewall-cmd --zone=public --add-port=80/tcp --permanent
Then use firewall-cmd --list-ports to check whether the port is open:
If it doesn't work, restart the firewall again and check the port configuration.
Other instructions reference:
Restart the firewall: systemctl restart firewalld.service
Check the opened port information:
firewall-cmd --list-ports
3. Commonly used firewall commands:
Check the firewall status, running means running:
firewall-cmd --state
stop command
systemctl stop firewalld.service
Start command
systemctl start firewalld.service
Restart command
systemctl restart firewalld.service