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 does the Linux system view the status of the firewall

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly shows you how the Linux system to view firewall status, the content is easy to understand, clear, hope to help you solve doubts, the following let the editor to take you to study and learn "Linux system how to view firewall status" this article.

Brief introduction of Linux system Firewall

A firewall is a set of rules. When a packet enters or leaves a protected network area, the content in and out, especially information about its source, destination, and protocol used, is detected according to firewall rules to determine whether it is allowed to pass. Here is a simple example:

Firewalls can filter requests based on protocols or target-based rules.

On the one hand, iptables is a tool for managing firewall rules on Linux machines.

On the other hand, firewalld is also a tool for managing firewall rules on Linux machines.

Do you have any questions? If I told you there was another tool called nftables, would it ruin your day?

Well, I admit the whole thing is a little funny, so let me explain. It all starts with Netfilter, which controls access to the network stack at the Linux kernel module level. For decades, the main command-line tool for managing Netfilter hooks was the iptables rule set.

Because the syntax required to invoke these rules seems a bit obscure, various user-friendly implementations, such as ufw and firewalld, have been introduced as higher-level Netfilter interpreters. However, ufw and firewalld are mainly designed to solve the problems faced by individual computers. Building a full range of network solutions usually requires iptables, or since 2014, its replacement nftables (nft command line tool).

Iptables has not disappeared and is still widely used. In fact, as an administrator, you should use iptables to protect the network for many years to come. But nftables brings some important new features by manipulating the classic Netfilter toolset.

Linux system View Firewall status

I. service mode

View firewall status:

[root@centos6 ~] # service iptables status

Iptables: the firewall is not running.

Turn on the firewall:

[root@centos6 ~] # service iptables start

Turn off the firewall:

[root@centos6 ~] # service iptables stop

II. Iptables mode

Enter the init.d directory first, and use the following command:

[root@centos6 ~] # cd / etc/init.d/ [root@centos6 init.d] #

And then

View firewall status:

[root@centos6 init.d] # / etc/init.d/iptables status

Temporarily turn off the firewall:

[root@centos6 init.d] # / etc/init.d/iptables stop

Restart iptables:

[root@centos6 init.d] # / etc/init.d/iptables restart

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

The above is about "how to check firewall status in Linux system". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to 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

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report