找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2987|回复: 0

[脚本] 请高手前来,脚本修改你是否能行(ADSL动态IP的映射与回流)

[复制链接]
发表于 2008-9-10 11:29:49 | 显示全部楼层 |阅读模式

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

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

×
本人想把全部端口映射到外网,并且配置回流,在网上找到的帖子用了,不行,也不怎麽会用,特情高手指点,我这有脚本,请高手帮忙改改,看哪里不对,谢谢,脚本如下:
#添加外网映射
/ ip firewall dst-nat
add in-interface=all dst-address=[/ip address get [/ip address find interface= [ /interface find type=pppoe-out ]]  address]  dst-port=0-65536 protocol=tcp action=nat to-dst-address=192.168.0.5 comment="0-65536" disabled=no
#下面做回流
#ftp端口回流
/ ip firewall src-nat
add out-interface=lan dst-address=[/ip address get [/ip address find interface= [ /interface find type=pppoe-out ]]  address]  dst-port=0-65536 protocol=tcp action=nat to-src-address=202.96.128.60 comment="0-65536src" disabled=no
/ ip firewall dst-nat
add in-interface=lan dst-address=[/ip address get [/ip address find interface= [ /interface find type=pppoe-out ]]  address]  dst-port=0-65536 protocol=tcp action=nat to-dst-address=192.168.0.5 comment="0-65536dst" disabled=no
#Web端口回流
/ ip firewall src-nat
add out-interface=lan dst-address=[/ip address get [/ip address find interface= [ /interface find type=pppoe-out ]]  address]  dst-port=80 protocol=tcp action=nat to-src-address=202.96.128.60 comment="80src" disabled=no
/ ip firewall dst-nat
add in-interface=lan dst-address=[/ip address get [/ip address find interface= [ /interface find type=pppoe-out ]]  address]  dst-port=80 protocol=tcp action=nat to-dst-address=192.168.0.5 comment="80dst" disabled=no "
192.168.0.5是内网IP
202.96.128.60是随便填写的,请高手指点怎么该,最好是改完,谢谢大家
再有就是这个脚本放到ros的系统-脚本-新建脚本把它一个个复制进去,对不对,脚本是开机自动运行的对吗?
routeros
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-2 07:44 , Processed in 0.107309 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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