Linux View firewall status and turn off command

Source: Internet
Author: User

There are two ways of doing this:

First, service mode

To view the firewall status:

[[Email protected] ~]# service iptables status

Iptables: Firewall is not running.

To turn on the firewall:

[[Email protected] ~]# service iptables start

To turn off the firewall:

[[Email protected] ~]# service iptables stop

Second, the Iptables way

Enter the INIT.D directory first, the command is as follows:

[Email protected] ~]# cd/etc/init.d/

[Email protected] init.d]#

And then

To view the firewall status:

[Email protected] init.d]#/etc/init.d/iptables status

To temporarily turn off the firewall:

[[email protected] init.d]#/etc/init.d/iptables stop

Restart Iptables:

[Email protected] init.d]#/etc/init.d/iptables restart

Transferred from: http://blog.csdn.net/lv_shijun/article/details/52453882

Linux View firewall status and turn off command (GO)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.