linux cenos open ports

Question: can not access port 8080

 solution:

Step 1 View Ali cloud port is open

Network Security> Security Group> Configuration Rules> Add-in direction

 

The second step to see whether the firewall is turned on (only said to open a case firewall) 

Check firewall status: systemctl status firewalld

 

 Check which ports are open firewall: firewall-cmd --list-ports

 

Add firewall port 8080: firewall-cmd --zone = public --add-port = 8080 / tcp --permanent

 

Restart the firewall: systemctl restart firewalld.service

Re-view open ports

 

 

So far the problem is solved

 

 

About firewalls commonly used commands:

1. Check the firewall status: systemctl status firewalld

2, turn off the firewall: systemctl status firewalld

3, the boot is disabled: systemctl disable firewalld

4, Power On: systemctl enable firewalld

5, restart the firewall: systemctl restart firewalld.service

6, to see which ports are open firewall: firewall-cmd --list-ports

7, open a port: firewall-cmd --zone = public --add-port = 80 / tcp --permanent

--zone # Scope

--add-port = 80 / tcp # Add port, the format is: port / protocol

--permanent # permanent, this parameter does not restart after failure

 

Guess you like

Origin www.cnblogs.com/xiao-sheng/p/11627509.html