我有一个 Mikrotik 750 路由器。我有一个 SVN 服务器设置为在服务器 192.168.1.111 上通过 https 运行。我将有多台机器使用标准的 ssl 端口,所以我决定使用端口转发。从防火墙外部,某些东西会通过 svn.mydomain.com:5555 访问我的公共 IP,它会转发到我的机器 192.168.1.111:443
使用规则:
chain=dstnat action=dst-nat to-addresses=192.168.1.111 to-ports=443
protocol=tcp in-interface=ether1-gateway dst-port=5555
一切正常,直到我尝试在防火墙后面使用 SVN。当然我可以直接访问服务器;但是,这意味着每次我想在网络内外工作时都要更改配置。我宁愿能够从防火墙后面访问 svn.mydomain.com:5555。我缺少什么规则?
编辑:添加的规则
注意:我正在使用主/从配置
;;; hairpin rule (not sure if to port is causing problems)
chain=srcnat action=masquerade to-ports=443 protocol=tcp
src-address=192.168.1.0/24 dst-address=192.168.1.111
out-interface=ether2-master-local dst-port=5555
;;; another rule I tried
chain=dstnat action=dst-nat to-addresses=192.168.1.111 to-ports=443
protocol=tcp dst-address=192.168.1.111 dst-address-type=local
in-interface=ether2-master-local dst-port=5555