大网数据广告活动
服务器运维问答

Mikrotik - NAT behind NAT

· 52CE 我爱测

I have two routers, one given by the internet provider, which I cannot control ( only they can ) and the second is my Mikrotik HAP ac (RB962UiGS-5HacT2HnT). My router was primary before, and I had several ports forwarded. Now it'…

问题原文

原帖链接 · kkazakov · CC BY-SA 3.0

I have two routers, one given by the internet provider, which I cannot control ( only they can ) and the second is my Mikrotik HAP ac (RB962UiGS-5HacT2HnT).

My router was primary before, and I had several ports forwarded. Now it's secondary, so I asked them to forward to the router's IP. However, that's not really working.

So my configuration is:

Outside router: 192.168.1.1 Inside router's static IP: 192.168.1.10

Outside port 7722 forwarded to 7722 of 192.168.1.10

Internal router (Mikrotik)'s IP: 192.168.88.1, my server's IP in the internal network is 192.268.88.25

On the internal router (Mikrotik) I have the following rules:

chain=dstnat action=dst-nat to-addresses=192.168.88.25 to-ports=22 protocol=tcp dst-address=192.168.1.1 dst-port=7722

Before adding another router in the loop, dst-address was the external IP address and this worked very well.

However, it's not working now. Any idea what I'm missing?

I cannot use their router, as it does not support 5Ghz network and wireless is extremely slow. However, I cannot plugin their optics directly to the Mikrotik, as they want to be able to "control" it ...

已采纳解答

原帖链接 · USD Matt · CC BY-SA 3.0

The first router is redirecting the packets (rewriting the destination) to 192.168.1.10:7722.

As such, this is the address and port that you need to match in the NAT rule on the Mikrotik.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-03-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。