Local-out流量控制
Local-out流量控制
Local-out流量指的是源自FortiGate并发往外部目标地址的流量。这种流量可能来自Syslog、FortiAnalyzer日志记录、FortiGuard服务、远程认证等。默认情况下,Local-out流量根据当前路由表来查找用于流量的出接口。但有些情况下,查询路由表的结果可能是去往目标IP的路径有多个出接口负载,但只有其中一个接口可以正确的到达目标地址。这种情况下如果负载到了错误的出接口,那么业务就会出现问题。
很多类型的Local-out流量支持根据SD-WAN规则或手工指定的接口作为出接口。在手工指定出口接口时,也可以指定源IP地址。支持设置出接口的Local-out流量类型如下所示:
Security Fabric→外部连接器(External Resources)中的终端/身份(Endpoint/Identity,可通过CLI配置)、威胁来源等(Threat Feeds,可通过GUI和CLI配置)。
日志中的FortiAnalyzer服务器、FortiAnalyzer Cloud服务器、FortiGate Cloud日志服务器、Syslog服务器等。(可通过GUI和CLI配置)
系统DNS服务器、FortiGuard服务器、FortiSandbox服务器等。(可通过GUI和CLI配置)
LDAP服务器、TACACS+服务器、Radius服务器等。(可通过CLI配置)
重要
如果FortiGate开启了多VDOM功能,以上内容中1、2、3需要在Global视图下配置,4需要在VDOM视图下配置。
Local-out流量配置
通过GUI配置
DNS流量
用户FortiGate设备路由表中有两条等价的默认路由,出接口分别为wan1和wan2,只有wan1可以正常到达DNS服务器,DNS流量默认情况下在wan1和wan2上负载,当负载到wan2时,DNS解析会失败。
FortiGate # get router info routing-table static
Routing table for VRF=0
S* 0.0.0.0/0 [10/0] via 172.22.5.1, wan2, [1/0]
[10/0] via 172.22.6.1, wan1, [1/0]
...在GUI上配置Local-out流量控制,首先要在“系统管理→可见功能”中开启“本地出向流量路由”。

config system global set gui-local-out enable end进入网络→本地出向路由页面,编辑系统DNS选项。

配置系统DNS的流出接口为指定模式,并选择wan1作为出接口(如果wan1上有多个IP,也可以修改源地址),点击确认下发配置。


config system dns set interface-select-method specify set interface "wan1" end
LDAP流量
用户FortiGate设备路由表中有两条去往LDAP服务器所在网段的路由,出接口分别为internal4和internal5,只有internal5可以正常到达LDAP服务器,LDAP流量默认情况下在internal4和internal5上负载,当负载到internal4时,LDAP会无法访问。
FortiGate # get router info routing-table static
S 192.168.100.0/24 [10/0] via 10.10.12.2, internal4, [1/0]
[10/0] via 10.10.13.2, internal5, [1/0]
...同时,LDAP服务器只允许FortiGate以10.10.12.111作为源IP访问。
进入网络→本地出向路由页面,编辑系统LDAP服务器选项(只有配置了LDAP/Radius/Tacacs+服务器后,才会在这里显示)。

配置系统LDAP服务器的流出接口为指定模式,并选择internal5作为出接口,选择源IP为手动模式,选择internal5接口的第二地址10.10.12.111,点击确认下发配置。


config user ldap edit "LDAP_Server1" set source-ip "10.10.12.111" set interface-select-method specify set interface "internal5" next end
通过CLI配置
PING & Traceroute
ping和traceroute命令除了可以指定接口和源地址,也可以指定是否使用SD-WAN规则发送。
execute ping-options use-sdwan {yes | no}
execute ping6-options use-sd-wan {yes | no}
execute traceroute-options use-sdwan {yes | no}集中管理
连接FortiManager进行集中管理的流量。
config system central-management
set interface-select-method {auto | sdwan | specify}
set interface <interface>
endNTP服务器
config system ntp
config ntpserver
edit <id>
set interface-select-method {auto | sdwan | specify}
set interface <interface>
next
end
endauto:查找路由表进行转发。sdwan:查找SD-WAN规则或策略路由进行转发。specify:手工指定接口转发。interface:interface-select-method配置为specify时可用,用于手工指定流量的出接口。
DHCP代理
config system settings
set dhcp-proxy-interface-select-method {auto | sdwan | specify}
set dhcp-proxy-interface <interface>
endDHCP中继
config system interface
edit <interface>
set dhcp-relay-interface-select-method {auto | sdwan | specify}
set dhcp-relay-interface <interface>
next
end证书SCEP
config vpn certificate setting
set interface-select-method {auto | sdwan | specify}
set interface <interface>
set source-ip <IP address>
endIPS TLS协议探测
config ips global
config tls-active-probe
set interface-selection-method {auto | sdwan | specify}
set interface <interface>
set vdom <VDOM>
set source-ip <IPv4 address>
set source-ip6 <IPv6 address>
end
endVDOM:当interface-selection-method设置为sdwan或specify时,可以指定流量的VDOM。
NetFlow/sFlow
NetFlow:
config system {netflow | vdom-netflow}
set interface-select-method {auto | sdwan | specify}
set interface <interface>
set source-ip <IP address>
end
sFlow:
config system {sflow | vdom-sflow}
config collectors
edit <id>
set interface-select-method {auto | sdwan | specify}
set interface <interface>
set source-ip <IP address>
next
end
endFortiClient EMS
config endpoint-control fctems
edit fctems1
set interface-select-method {auto | sdwan | specify}
set interface <interface>
set source-ip <IP address>
end
endTACACS+
config log tacacs+accounting setting
set interface-select-method {auto | sdwan | specify}
set interface <interface>
set source-ip <IP address>
end