首页 > 解决方案 > MikroTik 伪装 Vs。src-nat

问题描述

请让我知道是否应该在其他站点提出问题(例如:网络工程);我在这里问它是因为这里也问了其他与 MikroTik 相关的问题!


设置:

ADSL 调制解调器(桥接模式)---> MikroTik 的 ether1
Tp-Link Archer D7(作为 wAP;桥接模式)---> MikroTik 的 ether2
服务器---> MikroTik 的 ether3


网络:

ether1 上的 10.0.0.0/30 (ADSL-modem=10.0.0.1 / MikroTik-ether1=10.0.0.2)
bridge-ether2-ether3 上的 10.11.12.0/24 (MikroTik 的 ether2 和 ether3 被桥接)


防火墙过滤器:

0    ;;; Accept connection to WAN from 7 IPs from range 13 to 19
      chain=forward action=accept src-address=10.11.12.13-10.11.12.19 out-interface=PPPoE-to-Dlink

1    ;;; Drop all connection to WAN
      chain=forward action=drop out-interface=PPPoE-to-Dlink

自然法则:

chain=srcnat action=src-nat to-addresses=my.public.ip.address out-interface=PPPoE-to-Dlink

问题:

使用以下 Nat 规则,我正在尝试启用从 WAN / Internet 对我的服务器的 SSH 访问:

  1. /ip firewall nat add chain=dstnat action=dst-nat dst-port=2200 p rotocol=tcp to-addresses=10.11.12.14 to-ports=22
  2. /ip firewall nat add chain=dstnat action=dst-nat dst-port=2200 p rotocol=tcp to-addresses=10.11.12.14 to-ports=22 in-interface=ether1
  3. /ip firewall nat add chain=dstnat action=dst-nat dst-port=2200 p rotocol=tcp to-addresses=10.11.12.14 to-ports=22 in-interface=PPPoE-to-Dlink

以上均不适用于当前的src-natnat 规则;但如果我改用masquerade它,它会起作用的!

注意:我分别测试这些规则!

所以第一个问题是:什么masquerade不做,src-nat有什么区别?
第二:我该怎么办?

标签: firewallnatinternalsmikrotik

解决方案


推荐阅读