Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Teach you how to turn off the CentOS firewall from the command line

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This tutorial teaches you how to disable CentOS Firewall from the command line.

How to open port 80 and port 22 in firewall #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT#/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT#/etc/rc.d/init.d/iptables save

After restarting the computer, the firewall has opened ports 80 and 22 by default.

Temporary complete shutdown of the firewall, you can not restart the machine #/etc/init.d/iptables status ##View firewall status #/etc/init.d/iptable stop ##This time shut down the firewall #/etc/init.d/iptable restart #Restart the firewall permanently shut down the firewall #chkconfig --level 35 iptables off ##Note that the middle is two British short lines;#shutdown -r now ##Restart

Original text from: https://www.linuxprobe.com/centos-stop-firewall.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report