In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces which commands are commonly used in Linux firewall, the article is very detailed, has a certain reference value, interested friends must read it!
The firewall system of Linux mainly works in the network layer, which implements filtering and restriction on TCP/IP packets, which is a typical packet filtering firewall (or network layer firewall). In Linux, both netfilter and iptables refer to the Linux firewall. The difference is:
Netfilter: refers to the internal structure of the packet filtering firewall in the Linux kernel, which does not exist in the form of programs or files, and belongs to the "kernel state" firewall function system.
Iptables: refers to the command program used to manage the Linux firewall, usually located in / sbin/iptables, belonging to the "user mode" firewall management system.
1. Iptables Firewall
1. Basic operation
View firewall status
Service iptables status
Stop the firewall
Service iptables stop
Start the firewall
Service iptables start
Restart the firewall
Service iptables restart
Permanently turn off the firewall
Chkconfig iptables off
Restart after permanent shutdown
Chkconfig iptableson
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
open
Service firewalld start
Restart
Service firewalld restart
Close
Service firewalld stop
4. View firewall rules
Firewall-cmd-list-all
5. Query, open and close the port
Query whether the port is open
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 the firewall (restart the firewall after changing the configuration)
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
The above is all the contents of this article "what are the commands commonly used in Linux Firewall?" Thank you for your reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.