上网配置
2025/10/29大约 1 分钟
上网配置
网络需求
- 用户内部使用 IPv6 网络,FortiGate 作为客户网络的互联网边界介入防火墙,实现对互联网的访问。
- 外部互联网接入服务商为 IPv6 网络。
- 内部也为 IPv6 网络。
网络拓扑

配置要点
- 配置接口 IP
- 配置路由
- 配置策略
配置步骤
配置接口 IPv6 地址。


config system interface edit "lan" config ipv6 set ip6-address 2100::1/64 set ip6-allowaccess ping https ssh snmp http fgfm fabric end next edit "port18" config ipv6 set ip6-address 2200::2/64 set ip6-allowaccess ping https ssh snmp http fgfm fabric end next end配置 IPv6 路由。


config router static6 edit 1 set gateway 2200::1 set device "port18" next end创建内网网段的 IPv6 地址对象,进入策略 & 对象 → 地址,新建内网的 IPv6 地址对象。

config firewall address6 edit "LAN_IPv6_2100::/64" set uuid 042a2792-8d96-51ed-39e3-a512a3f5e16d set ip6 2100::/64 next end新建防火墙策略,允许内部 IPv6 访问外部 IPv6 网络,由于都是 IPv6 地址,可以直接通信,不需要开启 NAT。

config firewall policy edit 10 set name "to_IPv6_Internet" set srcintf "lan" set dstintf "port18" set action accept set srcaddr6 "LAN_IPv6_2100::/64" set dstaddr6 "all" set schedule "always" set service "ALL" next end
结果验证
客户端 PC 可以通过 FortiGate 正常访问 IPv6 Internet。
