In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the basic use of firewalld in Centos7". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Basic operation
# systemctl start firewalld / / start # systemctl status firewalld / / status # systemctl disable firewalld / / disable # systemctl stop firewalld / / stop
Systemctl is an indispensable management tool in centos7. It has all the functions of service and chkconfig.
# systemctl start firewalld.service / / start a service # systemctl stop firewalld.service / / shut down a service # systemctl restart firewalld.service / / restart a service # systemctl status firewalld.service / / display the status of a service # systemctl enable firewalld.service / / Random self-start # systemctl disable firewalld.service / / disable boot # systemctl is-enabled firewalld.service / / check whether boot starts # systemctl list-unit-files | grep enabled / / View already List of launched services # systemctl-- failed / / View the list of services that failed to start
Basic configuration firewalld-cmd
# firewall-cmd-- version / / View firewall version # firewall-cmd-- help / / View Command Operation help # firewall-cmd-- state / / Show current status # firewall-cmd-- zone=public-- list-ports / / View all open and running ports # firewall-cmd-- reload / / load # firewall-cmd-- list-all-zones immediately without restart | more / / View area information # firewall-cmd-- get- Zone-of-interface=eth0 / / View the area to which the specified API belongs # firewall-cmd-- panic-on / / reject all packets # firewall-cmd-- panic-off / / cancel the rejection status # firewall-cmd-- query-panic / / check whether to reject
For example, how to open a port, such as 3306
# firewall-cmd-- zone=public-- add-port=3306/tcp-- permanent / / add port 3306 (--permanent) permanently Invalidate after restart without this parameter # firewall-cmd-- reload / / load immediately # firewall-cmd-- zone= public-- query-port=3306/tcp / / View the status of joining port 3306 # firewall-cmd-- zone= public-- remove-port=3306/tcp-- permanent / / Delete the newly added firewall rule 330firewall firewall-cmd-- permanent-- remove-icmp-block=echo-request / / Delete prohibited ping# firewall-cmd-- permanent-- add-icmp- Block=echo-request / / enable disable ping# firewall-cmd-- get-service / / View the information that has been allowed
For specific rule management, you can use firewall-cmd, and specific usage can be
# firewall-cmd-help
Note: the above instructions and commands do not apply to the following versions of Centos7, except that you install firewall separately in other linux distributions.
This is the end of the content of "what is the basic use of firewalld in Centos7". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.