Fortigate 50B 上的端口转发

Fortigate 50B 上的端口转发

我在设置 Fortigate 50B 的端口转发时遇到了严重问题。该设备基本上按出厂默认设置运行,wan1 接口连接到我的光纤互联网调制解调器,我的 lan 连接到 Fortigate 的内部交换机。出厂默认防火墙策略允许从内部接口到 wan1 的流量,并且我可以正常访问互联网。

然后我添加了一个虚拟 IP 和一个防火墙策略,以允许从互联网访问我的本地服务器(ip 192.168.9.51)Web 服务器(标准端口 80)。我所做的设置如下。

编辑虚拟 IP 映射

Name : Server VIP
External interface : wan1
Type : Static NAT
Extermal IP Address/Range : 0.0.0.0
Mapped IP Address/Range : 192.168.9.51
Port Forwarding : not checked

防火墙策略

Source interface/Zone : wan1
Source address : all
Destination interface/Zone : internal
Destination address : Server VIP
Schedule : always
Service : HTTP
Action : ACCEPT
no other settings checked

现在的情况是,我无法从我的服务器访问互联网,也无法从互联网访问网络服务器。我可以在外部 ping 通一个网站,但所有网络流量都被双向阻止了。

我查看了文档,但据我所知,我已经正确设置了。这里有人了解 Fortigate 端口转发/NAT 吗?

答案1

好吧..我找到了解决方案:

Edit Virtual IP Mapping

Name : Server VIP
External interface : wan1
Type : Static NAT
Extermal IP Address/Range : xxx.xxx.xxx.xxx  <- insert external IP here
Mapped IP Address/Range : 192.168.9.51
Port Forwarding : not checked

我原来是你输入 wan1 接口的外部 ip,而不是使用 0.0.0.0,因为文档指出它对任何 ip 都有效。这很糟糕,因为如果我的 wan 接口在断电后更改 ip 地址,所有端口转发都将停止工作。但至少现在它可以工作了。

答案2

如果你要对所有出站数据进行 NAT,你肯定需要使用 VIP 检查防火墙策略上的 NAT。请先尝试一下。

相关内容