CentOS7 using FIREWALLD to turn off firewalls and ports

Source: Internet
Author: User

Tag: Port body start view load Cancel enabled admin specified

1, the basic use of the FIREWALLD start: Systemctl start Firewalld view state: Systemctl status Firewalld stop: Systemctl disable FIREWALLD disabled: systemct L Stop Firewalld2.systemctl is the primary tool in CentOS7 's service management tool, which incorporates the functionality of previous service and Chkconfig.

Start a service: Systemctl start Firewalld.service
Close a service: Systemctl stop Firewalld.service
Restart a service: Systemctl restart Firewalld.service
Displays the status of a service: Systemctl status Firewalld.service
Enable a service at boot: Systemctl enable Firewalld.service
Disable a service at boot: systemctl disable Firewalld.service
Check if the service is booting: Systemctl is-enabled firewalld.service
To view a list of services that have been started: Systemctl List-unit-files|grep enabled
To view a list of services that failed to start: Systemctl--failed

3. Configure Firewalld-cmd

View version: Firewall-cmd--version view Help: Firewall-cmd--help display Status: Firewall-cmd--state View all open ports: Firewall-cmd--zone=public-- List-ports Update firewall rules: Firewall-cmd--reload View area information: Firewall-cmd--get-active-zones View specified interface zone: Firewall-cmd-- Get-zone-of-interface=eth0 reject All packages: Firewall-cmd--panic-on de-deny status: Firewall-cmd--panic-off View reject: Firewall-cmd-- Query-panic How do I open a port? Add Firewall-cmd--zone=public --add-port=80/tcp--permanent (--permanent permanent, no failure after this parameter restart) Re-loadingFirewall-cmd--reloadViewfirewall-cmd --zone= public --query-port=80/tcp Delete Firewall-cmd--zone= public --remove-port=80/tcp--permanent

CentOS7 using FIREWALLD to turn off firewalls and ports

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.