In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use firewalld to set up firewall ports in CentOS 7. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Basic usage of firewalld
Launch: systemctl start firewalld
Turn off: systemctl stop firewalld
View status: systemctl status firewalld
Power on disabled: systemctl disable firewalld
Power on: systemctl enable firewalld
Systemctl is the main tool in CentOS7's service management tools, which combines the functions of service and chkconfig.
Main functions of systemctl:
Start a service: systemctl start firewalld.service
Shut down 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 time: systemctl enable firewalld.service
Disable one service at boot time: systemctl disable firewalld.service
Check to see if the service is powered on: systemctl is-enabled firewalld.service
View the list of started services: systemctl list-unit-files | grep enabled
View the list of services that failed to start: systemctl-- failed
Configure firewalld-cmd
View version: firewall-cmd-- version
Check out 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 the area to which the specified API belongs: firewall-cmd-- get-zone-of-interface=eth0
Reject all packages: firewall-cmd-- panic-on
Cancel rejection status: firewall-cmd-- panic-off
Check whether to reject: firewall-cmd-- query-panic
For example: open a port in the firewall
Add
Firewall-cmd-- zone=public-- add-port=80/tcp-- permanent (--permanent takes effect permanently. It will expire after restart without this parameter.
Reload
Firewall-cmd-reload
View
Firewall-cmd-zone= public-query-port=80/tcp
Delete
Firewall-cmd-zone= public-remove-port=80/tcp-permanent
On CentOS 7 how to use firewalld to set up the firewall port to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.