资源记录
rsrc.ink

FORTINET FW SNAT (SOURCE NAT) 飞塔防火墙源地址转换

需求场景  内部trust访问外部源地址转换

小企业办公环境使用飞塔防火墙做为出口网关接入互联网;内部用户使用私有地址段 10.1.1.0/24; 外部互联网接口地址20.0.0.1/24为运营商分配, 网关为20.0.0.100;  内部用户访问互联网需将内部源地址 10.1.1.0/24 转换为 20.0.0.2

关键配置如下:

fwa # show
config system global
    set hostname “fwa”
end
config system interface
edit “port1”
        set ip 10.1.1.254 255.255.255.0
set allowaccess ping https telnet
next
edit “port2”
        set ip 20.0.0.1 255.255.255.0
set allowaccess ping
next
end
config firewall address
    edit “inuser“
        set subnet 10.1.1.0 255.255.255.0
next
end
config firewall ippool
    edit “snat_pool“
        set startip 20.0.0.2
        set endip 20.0.0.2
next
end
config firewall policy
edit 10
        set srcintf “port1”
        set dstintf “port2”
        set srcaddr “inuser“
        set dstaddr “all”
        set action accept
        set schedule “always”
        set service “ALL”
        set nat enable
        set ippool enable
        set poolname “snat_pool“
next
end
config router static
edit 10
        set device “port2”
        set gateway 20.0.0.100
next
end

验证:通过在内网客户端使用ping和tracert 命令测试

server通过ping 8.8.8.8  和 tracert 8.8.8.8 测试是至互联网可达性

防火墙fwa使用get system session list 命令查看源地址转换表项