RouterOS的Port Forward問題

Dear 版上的先進,

我現在始用RouterOS做為家中的NAT
可是在做Port Forward時碰到下列的問題

當我在NAT規則中設定
/ip firewall nat
add action=masquerade chain=srcnat comment=Masquerade disabled=no
add action=dst-nat chain=dstnat comment=WWW disabled=no dst-port=80 in-interface=ether1 protocol=tcp to-addresses=10.10.10.199 to-ports=80

內部Server收到的是RouterIP而不是Visitor的Public IP
有沒有辦法可以在內部的Server知道Visitor的Public IP呢?

謝謝
2013-07-21 18:58 發佈
shiori wrote:
Dear 版上的先進...(恕刪)

我猜測RouterOS是接在Visitor LAN後面.
假如Visitor Gateway是192.168.0.1
RouterOS ether1 分配的IP是192.168.0.2

RouterOS Gateway為10.10.10.1
伺服器A接在RouterOS上,IP為10.10.10.199

若要從網外連接伺服器A ,設定應該是:
/ip firewall nat
add action=scr-nat chain=srcnat comment=Visitor disabled=no out-interface=ether1 to-addresses=192.168.0.2
add action=dst-nat chain=dstnat comment=WWW disabled=no dst-port=80 in-interface=ether1 protocol=tcp to-addresses=10.10.10.199

不過Visitor也要對192.168.0.2 TCP:80設置PortForwading,光只針對RouterOS是沒意義的.

gfx wrote:
我猜測RouterO...(恕刪)


抱歉,
可能我描述的不夠清楚
在這邊的Visitor是指外部IP(Public)的訪客

目前我在RouterOS上使用一個PPPoE的介面(pppoe-1)對外連線
直接接到ATU-R上
而內部透過這個介面NAT上網

現在的問題是我透過兩條規則
/ip firewall nat
add action=masquerade chain=srcnat comment=Masquerade disabled=no <-此條做NAT
add action=dst-nat chain=dstnat comment=WWW disabled=no dst-port=80 in-interface=pppoe-1protocol=tcp to-addresses=10.10.10.199 to-ports=80 <-此條將port80連入倒到.199的機器

但在.199的機器log中
外部連線進來的IP Address都被換成RouterOS這台IP了, 非連入的Public IP.
想請教有沒有辦法可以正常使.199抓到正確的連入IP?
魚說:你看不見我的淚水,因為我在水中..... 水說:我能感覺到你的淚水,因為妳在我的心中...
shiori wrote:
內部Server收到的是RouterIP..(恕刪)





shiori wrote:
Dear 版上的先進...(恕刪)


在NAT的設定裡面,多勾選下面這個:
irsjx2vxo3ne3k84dr1dz4,r4pe8bez3/4ne3bq4bew2j92gea jx4hq me-2d8 e3hy4hi2ty k84!
shiori wrote:
抱歉, 可能我描述的...(恕刪)

釜底抽薪,把RouterOS的網頁設定功能關閉,或是將預設Port的數值變更.您覺得如何?


這樣Portforward就會直接連結到.199 ,不會被RouterOS先奪去連結了.
照著YAWPYNG兄所提供的方法設定成功了
謝謝上面的幾位朋友幫忙
魚說:你看不見我的淚水,因為我在水中..... 水說:我能感覺到你的淚水,因為妳在我的心中...
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?