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

Vue+spring boot realizes the verification code function

This article example shares the specific code of ...

Creating private members in JavaScript

Table of contents 1. Use closures 2. Use ES6 clas...

How to display percentage and the first few percent in MySQL

Table of contents Require Implementation Code dat...

Detailed explanation of the execution process of mysql update statement

There was an article about the execution process ...

Html makes a simple and beautiful login page

Let’s take a look first. HTML source code: XML/HT...

Detailed explanation of JS array methods

Table of contents 1. The original array will be m...

CSS to achieve particle dynamic button effect

Original link https://github.com/XboxYan/no… A bu...

Summary of knowledge points about covering index in MySQL

If an index contains (or covers) the values ​​of ...

js to achieve cool fireworks effect

This article shares the specific code for using j...

JavaScript to implement the web version of Gobang game

This article shares the specific code for JavaScr...

Detailed explanation of Vue project packaging

Table of contents 1. Related configuration Case 1...

MySQL paging performance exploration

Several common paging methods: 1. Escalator metho...

Automatic line breaks in html pre tags

At this time, you can use overflow:auto; (when the...

Summary of Problems in Installation and Usage of MySQL 5.7.19 Winx64 ZIP Archive

Today I learned to install MySQL, and some proble...

Instructions for using the --rm option of docker run

When the Docker container exits, the file system ...