找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: cgs2006

[其它] ROS端口映射这样才正确的

  [复制链接]
发表于 2013-8-11 16:19:39 | 显示全部楼层
支持一下,好东西!
routeros
回复

使用道具 举报

发表于 2015-2-21 19:09:26 | 显示全部楼层
楼主深藏功与名,没有留下一片云彩
routeros
回复

使用道具 举报

发表于 2017-1-23 21:53:56 | 显示全部楼层
楼主是高手,请问回流如何解决?
routeros
回复

使用道具 举报

发表于 2017-1-24 01:11:30 | 显示全部楼层
这个思路我用过了,确实很受用,很不错的思路,很棒!
routeros
回复

使用道具 举报

发表于 2017-1-24 13:53:32 | 显示全部楼层
本帖最后由 xuxi3201 于 2017-1-24 14:24 编辑


我的add action=dst-nat chain=dstnat comment="" disabled=no dst-port=88 in-interface=ISP2016 protocol=tcp to-addresses=192.168.1.xxx to-ports=88


routeros
回复

使用道具 举报

发表于 2017-1-24 14:44:38 | 显示全部楼层
xuxi3201 发表于 2017-1-24 13:53
我的add action=dst-nat chain=dstnat comment="" disabled=no dst-port=88 in-interface=ISP2016 proto ...

我把你的改成 这样,结果用不起:
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=3389 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.88.100 to-ports=3389
routeros
回复

使用道具 举报

发表于 2017-1-24 15:03:50 | 显示全部楼层
楼主的办法 一行语句可以 回流。
我的办法 需要另外加一行语句。

特别说明一下:需要一个 无条件 masquerade
add action=masquerade chain=srcnat comment="" disabled=no
routeros
回复

使用道具 举报

发表于 2017-1-24 16:09:28 | 显示全部楼层
xuxi3201 发表于 2017-1-24 15:03
楼主的办法 一行语句可以 回流。
我的办法 需要另外加一行语句。

自己解决了。在routeros 6.38.1上完美通过。谢谢:
ip firewall nat add chain=dstnat dst-address-type=local protocol=tcp dst-port=61949 \ action=dst-nat to-address=192.168.88.100 to-port=61949
ip firewall nat add chain=srcnat src-address=192.168.88.0/24 \ dst-address=192.168.88.100 protocol=tcp dst-port=61949 \ out-interface=bridge action=masquerade
ip firewall nat add chain=srcnat src-address=192.168.123.0/24 \ dst-address=192.168.88.100 protocol=tcp dst-port=61949 \ out-interface=bridge action=masquerade

ip firewall nat add chain=dstnat dst-address-type=local protocol=tcp dst-port=38000-38010 \ action=dst-nat to-address=192.168.88.100 to-port=38000-38010
ip firewall nat add chain=srcnat src-address=192.168.88.0/24 \ dst-address=192.168.88.100 protocol=tcp dst-port=38000-38010 \ out-interface=bridge action=masquerade
ip firewall nat add chain=srcnat src-address=192.168.123.0/24 \ dst-address=192.168.88.100 protocol=tcp dst-port=38000-38010 \ out-interface=bridge action=masquerade


将端口改成想要的,就OK了。我有两个内网段,所以用了两条,如果你只有一条,自己改好了,
routeros
回复

使用道具 举报

发表于 2017-1-24 16:23:16 | 显示全部楼层
ip firewall nat add chain=srcnat src-address=192.168.0.0/16 \ dst-address=192.168.88.100 protocol=tcp dst-port=38000-38010 \ out-interface=bridge action=masquerade
这样就只要一条语句了。。更简单。。
routeros
回复

使用道具 举报

发表于 2017-1-24 16:29:38 | 显示全部楼层
楼主的办法 一行语句可以 回流。
如果不通,添加以下这一句
add action=masquerade chain=srcnat comment="" disabled=no
routeros
回复 1 0

使用道具 举报

发表于 2017-1-24 16:52:16 | 显示全部楼层
xuxi3201 发表于 2017-1-24 16:29
楼主的办法 一行语句可以 回流。
如果不通,添加以下这一句
add action=masquerade chain=srcnat comment ...

测试了,楼主的方法有效,更简单高效,通行,高手呀,谢谢!!!
routeros
回复

使用道具 举报

发表于 2019-5-17 12:52:27 | 显示全部楼层
楼主NB,,一句话解决了多线PCC负载,内网回流,不能用域名外网IP访问同内网服务器的问题。
routeros
回复

使用道具 举报

发表于 2019-6-1 19:07:28 | 显示全部楼层
楼主方法很凑效啊~感谢~
routeros
回复

使用道具 举报

发表于 2019-6-18 15:48:31 | 显示全部楼层
262587975 发表于 2009-7-28 23:12
我的nth是这样映射的
/ip firewall nat
add action=dst-nat chain=dstnat comment="Win2003 Remote" disabl ...

我也一直这样的哈`````
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-29 12:57 , Processed in 0.080153 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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