找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 老树昏鸦

[其它] 多线端口映射

[复制链接]
 楼主| 发表于 2013-1-27 12:04:12 | 显示全部楼层


应该还是端口映射的问题,搞了好几天,头大了,还是没有成功。

这是我现在的端口映射规则,童鞋们帮忙分析下,哪里有问题。四线PCC

/ip firewall nat
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
    in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.1.88 to-ports=\
    3389
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
    in-interface=pppoe-out2 protocol=tcp to-addresses=192.168.1.88 to-ports=\
    3389
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
    in-interface=pppoe-out3 protocol=tcp to-addresses=192.168.1.88 to-ports=\
    3389
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
    in-interface=pppoe-out4 protocol=tcp to-addresses=192.168.1.88 to-ports=\
    3389
add action=masquerade chain=srcnat comment="" disabled=no out-interface=LAN \
    src-address=192.168.1.88

/ip firewall mangle
add action=mark-connection chain=prerouting comment=protmap-3389 \
    connection-mark=other disabled=no in-interface=pppoe-out1 \
    new-connection-mark=protmap passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-mark=other \
    disabled=no in-interface=pppoe-out2 new-connection-mark=protmap \
    passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-mark=other \
    disabled=no in-interface=pppoe-out3 new-connection-mark=protmap \
    passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-mark=other \
    disabled=no in-interface=pppoe-out4 new-connection-mark=protmap \
    passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=protmap \
    disabled=no in-interface=LAN new-routing-mark=protmap-router passthrough=\
    no
routeros
回复

使用道具 举报

发表于 2013-1-29 14:31:50 | 显示全部楼层
ction=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
     in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.1.88 to-ports=\
     3389
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 \
     in-interface=pppoe-out2 protocol=tcp to-addresses=192.168.1.88 to-ports=\
     3389


都disable(就是禁用) 后,然后 设置可以内网192.168.1.88可以上网后 加
/ip firewall nat
add action=dst-nat chain=dstnat comment="wlanipchang" disabled=no dst-address=\
    1.2.2.2 dst-port=3389 protocol=tcp to-addresses=192.168.1.88 \
    to-ports=3389

1.2.2.2 为你外网ip 地址 如果是adsl拨号 就得设置自动改此ip地址为对应的 adsl外网ip

试试这个自动更新命令

:global newipaddress
:global lodipaddress
:set newipaddress [/ip address get [/ip address find dynamic=yes interface="pppoe-out1"] address]
:set newipaddress [:pick $newipaddress 0 ([:len $newipaddress] -3)]
:set lodipaddress [/ip firewall nat get [/ip firewall nat find comment="wlanipchang"] dst-address]
:if ($newipaddress != $lodipaddress) do={/ip firewall nat set [/ip firewall nat find comment="wlanipchang"] dst-address=$newipaddress}
:log info "〖adsl映射修改完毕〗"
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-11-6 05:02 , Processed in 0.060015 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表