debian

Debian防火墙集群部署方案

小樊
46
2025-11-21 12:28:02
栏目: 智能运维

架构与组件选型

基础环境准备

防火墙与NAT规则模板

示例 nftables 规则片段(/etc/nftables.conf)

table inet filter {
  chain input {
    type filter hook input priority 0; policy drop;
    iif "lo" accept
    ct state established,related accept
    tcp dport { 22, 80, 443 } accept
    icmp type echo-request accept
    counter drop
  }
  chain forward {
    type filter hook forward priority 0; policy drop;
    ct state established,related accept
    iif "eth0" oif "eth1" accept   # 按需放通南北向转发
    counter drop
  }
}

table ip nat {
  chain prerouting {
    type nat hook prerouting priority -100; policy accept;
    tcp dport 443 dnat to 192.168.10.10:8443
  }
  chain postrouting {
    type nat hook postrouting priority 100; policy accept;
    oif "eth0" masquerade
  }
}

高可用集群部署

运维与验证清单

0
看了该问题的人还看了