How to check if the firewall is turned off in Linux

How to check if the firewall is turned off in Linux

1. Service method

Check the firewall status:

[root@centos6 ~]# service iptables status

iptables: No firewall running.

Recommended tutorial: Linux tutorial

2. iptables method

First enter the init.d directory, the command is as follows:

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

[root@centos6 init.d]#

Then check the firewall status:

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

Content extension:

The firewall configuration of CentOS7 is very different from previous versions. The default firewall of CentOS7 is firewall, which is different from the iptables used in previous versions.

1. Turn off the firewall:

systemctl stop firewalld.service

2. Enable the firewall:

systemctl start firewalld.service

3. Turn off the startup:

systemctl disable firewalld.service

4. Start the boot process:

systemctl enable firewalld.service

This is the end of this article about the example method of checking whether the firewall is turned off in Linux. For more information about how to check whether the firewall is turned off in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux firewall status check method example
  • How to configure Linux firewall and open ports 80 and 3306
  • A brief analysis of Linux to check the firewall status and the status of the ports open to the outside world
  • How to modify firewall configuration in Linux system
  • How to use firewall iptables strategy to forward ports on Linux servers

<<:  JavaScript ECharts Usage Explanation

>>:  Summary of MySQL lock knowledge points

Recommend

JavaScript to implement a simple web calculator

background Since I was assigned to a new project ...

Raspberry Pi msmtp and mutt installation and configuration tutorial

1. Install mutt sudo apt-get install mutt 2. Inst...

MYSQL A question about using character functions to filter data

Problem description: structure: test has two fiel...

Some useful meta setting methods (must read)

<meta name="viewport" content="...

Analysis of the implementation process of three modes of VMWare network adapter

Three modes Bridged (bridge mode), NAT (network a...

HTML background color gradient achieved through CSS

Effect screenshots: Implementation code: Copy code...

MySQL 8.0.18 installation and configuration graphic tutorial

Learning objectives: Learn to use Windows system ...

Organize the common knowledge points of CocosCreator

Table of contents 1. Scene loading 2. Find Node 1...

How to use regular expression query in MySql

Regular expressions are often used to search and ...

Using js to implement simple switch light code

Body part: <button>Turn on/off light</bu...

Detailed explanation of the use of Vue's new built-in components

Table of contents 1. Teleport 1.1 Introduction to...

An article to understand Linux disks and disk partitions

Preface All hardware devices in the Linux system ...

In-depth explanation of the maximum value of int in MySQL

Introduction I will write about the problem I saw...

Detailed explanation of Vuex environment

Table of contents Build Vuex environment Summariz...