找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1859|回复: 4

[其它] 关于ros2.9.27的SRC-NAT问题

[复制链接]
发表于 2006-10-15 17:29:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
各位高人:
    小弟初次使用ros,版本为2.9.27(L6),想将内网的web服务器映射到公网地址上,根据ROS说明书按照如下操作可以实现外网访问内网服务器,但是内网工作站无法访问本地的服务器,

以下为routeros_Reference_Manual_v2.9.pdf(官方)手册的原始描述:
----------------------------------------------------
Example of Destination NAT
If you want to link Public IP 10.5.8.200 address to Local one 192.168.0.109, you should use
destination address translation feature of the MikroTik router. Also if you want allow Local server
to talk with outside with given Public IP you should use source address translation, too

Add Public IP to Public interface:

/ip address add address=10.5.8.200/32 interface=Public    &&第一次动作


Add rule allowing access to the internal server from external networks:

/ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat \
to-addresses=192.168.0.109      &&第二次动作


Add rule allowing the internal server to talk to the outer networks having its source address
translated to 10.5.8.200:

/ip firewall nat add chain=srcnat src-address=192.168.0.109 action=src-nat \
to-addresses=10.5.8.200     &&第三次动作
---------------------------------------------------------
反复试验后发现将第三次动作中的“src-address=192.168.0.109”改写为“src-address=192.168.0.0/24”,方可以实现。原文档难道有误,但是从原理角度应如此,为何要如此改动?请各位老大指正!谢谢!
routeros
发表于 2006-10-15 23:03:01 | 显示全部楼层
src-address=192.168.0.109/32 试试呢  你改的目的无非转换的网段而不是单IP,应该不是这个问题吧!
routeros
回复

使用道具 举报

legou 该用户已被删除
发表于 2006-10-16 12:41:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
routeros
回复

使用道具 举报

 楼主| 发表于 2006-10-16 17:25:35 | 显示全部楼层

回复 #3 legou 的帖子

楼上两位老大,我用src-address=192.168.0.109/32,也不行。另外,如果不用这个怎么映射?谢谢!
routeros
回复

使用道具 举报

发表于 2006-10-16 18:16:13 | 显示全部楼层
ip firewall nat add chain=srcnat dst-address=192.168.0.109  action=dst-nat \
to-addresses=10.5.8.200
你只需要映射80端口,那你端口就不影射啦?
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-10-1 01:23 , Processed in 0.139503 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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