Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use firewall Firewall

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use the firewall firewall, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

As we all know, in RHEL7 system, firewalld firewall replaces iptables firewall. We all know that iptables's firewall policy is handled by the kernel-level netfilter network filter, while firewalld is handled by the kernel-level nftables packet filtering framework.

Check the firewall version: firewall-cmd-version

[root@localhost] # firewall-cmd-- version0.4.4.4 [root@localhost ~] #

Basic use of firewalld

Start:

Systemctl start firewalld

View status:

Systemctl status firewalld

Stop:

Systemctl disable firewalld

Disable:

Systemctl stop firewalld

Configure firewalld

View the 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 the area to which the specified interface belongs:

Firewall-cmd-get-zone-of-interface=eth0

Reject all packages:

Firewall-cmd-panic-on

Cancel the rejection status:

Firewall-cmd-panic-off

Check to see if you reject:

Firewall-cmd-query-panic

Add

Firewall-cmd-zone=public-add-port=80/tcp-permanent

(- permanent is in effect forever. 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 are all the contents of this article "how to use firewall Firewall". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Development