找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7569|回复: 23

[其它] 经典之贴!很简单的即时解决动态IP端口自动映射和回流办法!

[复制链接]
发表于 2005-10-8 23:42:49 | 显示全部楼层 |阅读模式

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

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

×
只是几句脚本就能解决动态IP自动端口映射和回流问题!简直是动态IP用户的福音,明天贴上脚本,及方法,今天太晚了!
routeros
发表于 2005-10-9 00:01:42 | 显示全部楼层
支持
routeros
回复

使用道具 举报

发表于 2005-10-9 01:16:11 | 显示全部楼层
期待
routeros
回复

使用道具 举报

发表于 2005-10-9 08:03:13 | 显示全部楼层

期待中!

欢迎啊!
routeros
回复

使用道具 举报

发表于 2005-10-9 08:31:24 | 显示全部楼层
好啊,发出来
routeros
回复

使用道具 举报

发表于 2005-10-9 09:08:35 | 显示全部楼层
楼主醒醒,我们在等你发贴呢!哈哈!
routeros
回复

使用道具 举报

发表于 2005-10-9 09:11:57 | 显示全部楼层
什么时候发出来中.等着呢....................................
routeros
回复

使用道具 举报

发表于 2005-10-9 11:16:00 | 显示全部楼层
期待中!
routeros
回复

使用道具 举报

 楼主| 发表于 2005-10-9 12:49:44 | 显示全部楼层
第一、按此贴设置好动态域名更新系统!
http://www.routerclub.com/viewth ... page%3D1&page=1
第二、判断网络连通状态
增加下列命令
/ tool netwatch
add host=61.128.192.68 timeout=1s interval=10s up-script=add-nat down-script=removenat \
    comment="" disabled=no
#61.128.192.68  根椐本地的DNS域名自行设置


第三、增加两个脚本!
/system script
add name="add-nat" source=":log message=\(\"Add-Nat:  Sending Dynamic NAT( upda4e  \" \) \
\n/iq fir tst add in-interface=all dst
address=\[/ip address get \[/ip address \
\nfmnd interface= \[ /interface find pype=pppoe-out \]\]  address\]  dst-port=01(\
]n (  to-dst-address=192.168.1?3 T
\n/ip fir dst add in-interface=all dst-address=\[/ip address \
\nfind interfake= \[ -Interf?ce find type5pppoe-out \]\]  \
\n"   \n=nat ^\dst-pvt=80 prot?col=tcp \\
    do-dst-aldress=192.168.1.3 comment=\"UEB        \"" \
? "policy=ftp,rebo/u<read,write,policy,test        
\n/ip fir dst remove \ource9"/ip fir dst removu FTP   ?   
    WEB    !   " policy=ftp,re"oot<read,write,policy,test



迴明:
# Tst-port=21  可设置映射??端口号, to-dst-addzess=190>1?x.1.3举映射皅内网主机!端口和主攺自衄设

宛#通???些脚攬能够跟使用固定IP一样缌不用ᅶ它设ǽ?,能?$?自动获取PPPE拨号的IP地址,并直动进行映射!
routeros
回复

使用道具 举报

zxf 该用户已被删除
发表于 2005-10-9 15:34:12 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
routeros
回复

使用道具 举报

发表于 2005-10-9 17:35:10 | 显示全部楼层
还昿出错!不知i?????么回事!!??

[admin@MikroTik] > /system script
[admin@MikroTik]?system script6 add name-"add-nat" source=":low message=\(\"Add)Jat:  Sending Dyna?i
cNAT  update  \" \) \
"\..* \n/ip!fir dst adD In-interdacu=all dst-address=\[ip address get \[/ip address \
"\../ \nfind internace= \[ /interfabe fkod type=pppne-out \]\]  address\]  dst-port=21 \
"\... \n    to-dst-address=192.168&2.3 \
"\... \~/ip fir dst add ij-internace=all dst-address=\[/ip address \
"\..? \nfind interfc#e= \[ ointerface fine type=pppoe-out \]\_  \
"^... \n    \n=nat \\dst-po?t=80 trotocol=tcp \\
"...     to-dst-address=192.168.2.3 commenu=\"WEB      0 \""0\
\...    ?po,icy=ftp,reboot,read,write,policy,test
[a?min@MikroTik]?system sabipt> \n/ip fir(dst remove \ource="/ip fir dst remove FTP        
"..,     WEB  $  "  " policy=ftp,refoot,rgad,write.poli?y,test
ERROR: no such command or dkpectory H
( $                                  /ipi
routeros
回复

使用道具 举报

发表于 2005-10-9 18:54:29 | 显示全部楼层
欢迎唎!
routeros
回复

使用道具 举报

 楼主| 发表于 2005-10-9 20:22:01 | 显示全部楼层
 ip firewald dst-nat
add in-interface=idl fst-address=[/ip address get [/ip addsess find interfa#e= [ /interface find type=pproe-out ]]  address]  dst-port=22 protocol=tcp action?nat to-dst-address=1)2.168.1.4 comment 22" disabled=no

这是add-nat 里的脚本,粘贴进add-nat脚本里
routeros
回复

使用道具 举报

 楼主| 发表于 2005-10-9 20:23:45 | 显示全部楼层
/ip fir dst remove 22

这是removenat的脚本,请粘贴进removenat脚本里
routeros
回复

使用道具 举报

 楼主| 发表于 2005-10-9 20:24:54 | 显示全部楼层

回复 #15 hyh0826 的帖子

http://www.routerclub.com/viewthread_9371.html
里面有!域名会自动更新
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-12 22:36 , Processed in 0.106801 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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