Centos 7 Firewall Firewalld Open 80 port Chocolate release time: -- One- , -: -: 14 Categories: Linux browse:1943go back to the previous page open port 801Firewall-cmd--zone= Public--add-port= the/TCP--permanent appears success indicates the meaning of the Add Success command:--Zone #作用域--add-port= the/tcp #添加端口 in the format: Port/Communication Protocols--permanent #永久生效, fail to restart firewall without this parameter reboot1systemctl Restart Firewalld.service1, run, stop, disable FIREWALLD start: # systemctl start Firewalld View status: # SYSTEMCTL status Firewalld or firewall-cmd--State stopped: # systemctl disable FIREWALLD disabled: # systemctl stop Firewalld2, Configuration Firewalld View version: $ firewall-cmd--version View Help: $ firewall-cmd--Help View settings: Display Status: $ firewall-cmd--State View area information: $ firewall-cmd--Get-active-zones view the specified interface zone: $ firewall-cmd--Get-zone-of-Interface=eth0 Reject All packages: # firewall-cmd--panic-On cancel deny status: # Firewall-cmd--panic-off to see if reject: $ firewall-cmd--query-Panic Update firewall rules: # firewall-cmd--reload# Firewall-cmd--complete-Reload the difference between the two is the first one without disconnecting, is one of the FIREWALLD features dynamically add rules, the second need to disconnect, similar to restart the service to add the interface to the zone, the default interface is public# firewall-cmd--zone= Public--add-Interface=eth0 Permanent entry into force plus--permanent then reload firewall to set the default interface area # Firewall-cmd--Set-default-zone= Publicimmediate effect without restarting the open port (which seems to be the most common) view all open ports: # firewall-cmd--ZONE=DMZ--list-ports Add a port to the zone: # firewall-cmd--ZONE=DMZ--add-port=8080/TCP to permanently effect the method above opens a service, similar to visualizing the port, the service needs to be added in the configuration file,/etc/Firewalld directory under the Services folder, this is not detailed, the details of the reference Document # Firewall-cmd--zone=work--add-service=SMTP Removal Service # Firewall-cmd--zone=work--REMOVE-SERVICE=SMTP
Centos 7 Firewall Firewalld Open 80 port