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 explanation of JS browser storage

Table of contents introduction Cookie What are Co...

Detailed explanation of the basic use of centos7 firewall in linux

1. Basic use of firewalld start up: systemctl sta...

Use Element+vue to implement start and end time limits

This article example shares the specific code for...

How to implement distributed transactions in MySQL XA

Table of contents Preface XA Protocol How to impl...

Vue component organization structure and component registration details

Table of contents 1. Component Organization 2. Co...

Enabling and configuring MySQL slow query log

Introduction MySQL slow query log is an important...

Vue simulates the shopping cart settlement function

This article example shares the specific code of ...

A simple way to implement Vue's drag screenshot function

Drag the mouse to take a screenshot of the page (...

Zabbix redis automatic port discovery script returns json format

When we perform automatic discovery, there is alw...

How to simplify Redux with Redux Toolkit

Table of contents Problems Redux Toolkit solves W...

Pure HTML and CSS to achieve JD carousel effect

The JD carousel was implemented using pure HTML a...

Detailed example of MySQL (5.6 and below) parsing JSON

MySQL (5.6 and below) parses json #json parsing f...

Mysql transaction concurrency problem solution

I encountered such a problem during development A...

Linux file and user management practice

1. Display the files or directories in the /etc d...