In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces in detail how to check the status of the firewall in the linux system. The sample code in this article is very detailed and has a certain reference value. Interested friends can refer to it.
The method of checking the status of linux Firewall
1. Basic operation
# View Firewall status service iptables status# stop Firewall service iptables stop# start Firewall service iptables start# restart Firewall service iptables restart# permanently close Firewall chkconfig iptables off# permanently shut down restart chkconfig iptables on
Recommended: Linux self-study video
2. Open port 80
Vim / etc/sysconfig/iptables# adds the following code-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT
Restart the firewall after saving exit
Service iptables restart
II. Firewall Firewall
1. View the status of firewall service
Systemctl status firewalld
When Active: active (running) is highlighted, it indicates that it is in the starting state.
The appearance of Active: inactive (dead) gray indicates stop, or look at the word.
2. Check the status of firewall
Firewall-cmd-state
3. Enable, restart, shut down, and firewalld.service services
# enable service firewalld start#, restart service firewalld restart# and disable service firewalld stop
4. View firewall rules
Firewall-cmd-list-all
5. Query, open and close the port
# query whether the port is open for firewall-cmd-- query-port=8080/tcp# open port 80 firewall-cmd-- permanent-- add-port=80/tcp# remove port firewall-cmd-- permanent-- remove-port=8080/tcp# restart firewall (restart firewall after configuration modification) firewall-cmd-- reload
Parameter interpretation
1. Firwall-cmd: a tool for operating firewall provided by Linux
2.-- permanent: set to persistent
3.-- add-port: identifies the added port
On how to view the status of the firewall in the linux system is shared here, of course, not only the above and everyone analysis methods, but the editor can ensure its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.