firewall - 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 访问:
/ip firewall nat add chain=dstnat action=dst-nat dst-port=2200 p rotocol=tcp to-addresses=10.11.12.14 to-ports=22
/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
/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-nat
nat 规则;但如果我改用masquerade
它,它会起作用的!
注意:我分别测试这些规则!
所以第一个问题是:什么masquerade
不做,src-nat
有什么区别?
第二:我该怎么办?
解决方案
推荐阅读
- javascript - 无法生成 0 到 10 之间的随机数
- java - 如何在 java 中创建可用的 KeyReleased 方法
- php - PHP If 语句 if (!$_POST) - !$_POST 是什么意思?
- java - 如何使用@Transaction 和线程
- r - 创建矩阵行索引,当 rowsum > 100 和下一行时递增
- visual-studio - 如何在 Visual Studio 2017 中克隆解决方案(使用不同的名称)?
- android - 背景图片不显示在手机上
- c# - 为 WPF CustomControl 设置默认 ControlTemplate
- tensorflow - 既然我们有了 Tensorflow Serving,“Tensorflow Distibuted”到底是什么?
- python - python3.6中的请求库获取方法错误