Debian系統中的防火墻配置文件主要位于以下幾個位置:
iptables 規則文件:
/etc/iptables/rules.v4
/etc/iptables/rules.v6
。iptables-persistent:
iptables-persistent
包時,系統會提示你是否保存當前的防火墻規則。這些規則會被保存到 /etc/iptables/
目錄下。。sudo systemctl restart netfilter-persistent.service
ufw 配置文件(Uncomplicated Firewall):
/etc/default/ufw
。。/etc/ufw/applications.d/
目錄中。。firewalld 配置文件(適用于較新的Debian版本,如Debian 12):
/etc/firewalld/
目錄下。。sudo firewall-cmd --runtime-to-permanent
sudo firewall-cmd --reload
請注意,具體文件位置和名稱可能會因Debian版本的不同而有所差異。建議查閱你所使用的Debian版本的官方文檔以獲取最準確的信息。