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

Detailed graphic tutorial on installing and uninstalling Tomcat8 on Linux

[ Linux installation of Tomcat8 ] Uninstall Tomca...

Implementation of formatting partitions and mounting in Centos7

Linux often encounters situations such as adding ...

Detailed description of mysql replace into usage

The replace statement is generally similar to ins...

Teach you how to build hive3.1.2 on Tencent Cloud

Environment Preparation Before starting any opera...

Three examples of nodejs methods to obtain form data

Preface Nodejs is a server-side language. During ...

Using jQuery to implement the carousel effect

What I bring to you today is to use jQuery to imp...

Example code for implementing the wavy water ball effect using CSS

Today I learned a new CSS special effect, the wav...

CentOS uses local yum source to build LAMP environment graphic tutorial

This article describes how to use the local yum s...

Detailed explanation of the construction and use of docker private warehouse

1. Download the repository image docker pull regi...

Three BOM objects in JavaScript

Table of contents 1. Location Object 1. URL 2. Pr...

How to clear the cache after using keep-alive in vue

What is keepalive? In normal development, some co...

Detailed explanation of the pitfalls of nginx proxy socket.io service

Table of contents Nginx proxies two socket.io ser...

How to mount a data disk on Tencent Cloud Server Centos

First, check whether the hard disk device has a d...