引用
# Generated by xtables-save v1.8.2
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags RST RST -j LOG --log-ip-options --log-prefix "RST_attack"
-A INPUT -p tcp -m tcp --tcp-flags RST RST -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j LOG --log-ip-options --log-prefix "input_droped"
-A INPUT -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j LOG --log-ip-options --log-prefix "forward_droped"
-A FORWARD -j DROP
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -o lo -j ACCEPT
-A OUTPUT -m state --state NEW -j ACCEPT
# -A OUTPUT -j LOG --log-ip-options --log-prefix "output_droped"
# -A OUTPUT -j DROP
COMMIT
# Completed
引用
# Generated by xtables-save v1.8.2
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
-A INPUT -s ::1/128 -d ::1/128 -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags RST RST -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j DROP
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -s ::1/128 -d ::1/128 -o lo -j ACCEPT
-A OUTPUT -m state --state NEW -j ACCEPT
-A OUTPUT -j DROP
COMMIT
# Completed
引用
#!/bin/sh
/sbin/iptables-restore < /etc/iptables.rules
/sbin/ip6tables-restore < /etc/ip6tables.rules
引用
# cp iptables.rules /etc/
引用
# cp ip6tables.rules /etc/
引用
# chmod +x firewall2
引用
# cp firewall2 /etc/network/if-pre-up.d/
引用
# reboot
引用自: jingyue 于 八月 21, 2019, 03:47:26 上午
Debian 10 定制 iptables 个人桌面防火墙规则,
引用自: jingyue 于 九月 01, 2019, 03:04:08 上午
Debian 10 查看防火墙记录,
在 0.039 秒内创建了带有 17 查询的页面。