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

Bird Brother Chaoyangchun client Firewall Design and Firewall Rule Storage

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

# 1. Clear Rul

Iptables-F clears all established rules

Iptables-X kills all users'"custom" chain (tables should be said)

Iptables-Z returns all chain counts and traffic statistics to zero.

# 2. Set a policy

Iptables-P INPUT DROP

Iptables-P OUTPUT ACCEPT

Iptables-P FORWARD ACCEPT

# 3-5. Make rules

Iptables-An INPUT-I lo-j ACCEPT

Iptables-An INPUT-I eth0-m state-- state RELATED,ESTABLISHED-j ACCEPT

# iptables-An INPUT-I eth0-s 192.168.1.0 take 24-j ACCEPT

# 6. Write to firewall rule profile

/ etc/init.d/iptables save

[root@www ~] # sh bin/firewall.sh

Iptables: Saving firewall rules to / etc/sysconfig/iptables: [OK]

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

Network Security

Wechat

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

12
Report