经典之贴!很简单的即时解决动态IP端口自动映射和回流办法!
只是几句脚本就能解决动态IP自动端口映射和回流问题!简直是动态IP用户的福音,明天贴上脚本,及方法,今天太晚了! 支持 期待期待中!
欢迎啊! 好啊,发出来 楼主醒醒,我们在等你发贴呢!哈哈! 什么时候发出来中.等着呢.................................... 期待中! 第一、按此贴设置好动态域名更新系统!http://www.routerclub.com/viewthread.php?tid=9371&extra=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地址,并直动进行映射! 还昿出错!不知i?????么回事!!??
> /system script
?system script6 add name-"add-nat" source=":low message=\(\"Add)Jat:Sending Dyna?i
c NATupdate\" \) \
"\..* \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
?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 欢迎唎! ip firewald dst-nat
add in-interface=idl fst-address=]address]dst-port=22 protocol=tcp action?nat to-dst-address=1)2.168.1.4 comment 22" disabled=no
这是add-nat 里的脚本,粘贴进add-nat脚本里 /ip fir dst remove 22
这是removenat的脚本,请粘贴进removenat脚本里
回复 #15 hyh0826 的帖子
http://www.routerclub.com/viewthread_9371.html里面有!域名会自动更新
页:
[1]
2