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

What is the linux firewall view method?

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "linux firewall view method is what", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "linux firewall view method is what" it!

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 iptables on

2. Open port 80

Vim / etc/sysconfig/iptables# add the following code-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT save and exit and restart the firewall 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 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 explanation 1. Firwall-cmd: a tool for operating firewall provided by Linux; 2.-- permanent: set to persistent 3.-- add-port: identify the added port; thank you for reading, the above is the content of "what is the linux firewall viewing method?" after the study of this article, I believe you have a deeper understanding of what the linux firewall viewing method is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report