Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Bird Brother Chaoyangchun client Firewall Design and Firewall Rule Storage

Shulou Source: shulou.com Published: 2022-06-01 08:49:36 10月03日 Update

# 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]

Tags: Rules firewall fire prevention users policies files traffic statistics configuration customer client Yangchun design Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux OPPO Reno Redmi Huawei Shulou Information