[操作疑難] Mikrotik Router - Loopback function

請問有無CHING識set loopback function ?

以前用ASUS, TPLINK
就算o係屋企都可以打DDNS入自己NAS
而家就要用Inter IP

Thanks

好似要响dns到加返自己domain轉返去internal ip咁去做, 但再跟port轉去唔同既ip就唔得

TOP

You need extra SNAT rule

here is a how to
https://yaleman.org/2014/10/23/hairpin-nat-on-mikrotik-v6-19/

TOP

add action=masquerade chain=srcnat comment=\
"NAT Loopback" src-address=192.168.88.0/24

TOP

回覆 4# whitechunk


    thanks ching先
但其實我想問, 呢D COMMENT點樣打入去
因我用WINBOX, graphic interface多

TOP

回覆  whitechunk


    thanks ching先
但其實我想問, 呢D COMMENT點樣打入去
因我用WINBOX, graphic int ...
buddy25 發表於 2015-7-16 16:51


Here


Also you need type this command before you use whitechunk ching's command
  1. /ip firewall nat
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

Here


Also you need type this command before you use whitechunk ching's command
mc16888 發表於 16/7/2015 06:42 PM



    ching,  跟你咁set左, 但loopback唔到

TOP

RE: Mikrotik Router - Loopback function

本帖最後由 mc16888 於 2015-7-16 22:28 編輯
ching,  跟你咁set左, 但loopback唔到
肥矢 發表於 2015-7-16 21:21


Just checked my backup config from my RB2011, missing the out-interface parameter, I think you can edit the rule and put in the out-interface parameter using winbox gui.

my configure is like this
  1. add action=dst-nat chain=dstnat dst-address-type=local dst-port=8000-8001 protocol=tcp to-addresses=192.168.88.18 to-ports=8000-8001
  2. add action=masquerade chain=srcnat comment="Default masquerade" out-interface=WAN to-addresses=0.0.0.0
  3. add action=masquerade chain=srcnat comment="Hairpin Nat" out-interface=bridge-local src-address=192.168.88.0/24       
複製代碼
1. DNAT port 8000-8001 to internal ip 192.168.88.18
2. Default SNAT for internet, out-interface is internet interface name, I rename it to WAN
3. Nat loopback SNAT rule, out-interface should be your local lan interface name, I use bridge, so the name is bridge-local, source-address is my local subnet.

TOP

本帖最後由 kofz 於 2015-7-16 22:38 編輯

我係咁,例如

ros 內網ip係 192.168.1.1
Nas就 192.168.1.2 (port 1234)

port forward
192.168.1.1 既 port 80
192.168.1.2 既 port 1234

咁就係網外用dns入到

TOP

回覆 9# kofz


    我係想內聯都係打ddns入

TOP