ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

楼主: JiWar

[原创] 待编辑

  [复制链接]
发表于 2016-12-1 18:32:06 | 显示全部楼层
学习一下是什么情况
发表于 2016-12-2 09:38:06 | 显示全部楼层
CECECECECECECE
发表于 2016-12-3 11:45:04 | 显示全部楼层
/ip firewall mangle
add action=add-src-to-address-list address-list=notyet address-list-timeout=1s chain=prerouting comment=Push disabled=no dst-port=80 protocol=tcp src-address-list=!already
add action=add-src-to-address-list address-list=already address-list-timeout=30m chain=prerouting disabled=no dst-port=80 protocol=tcp src-address-list=notyet
/ip firewall nat add action=redirect chain=dstnat comment=Push disabled=no dst-port=80 protocol=tcp src-address-list=notyet to-ports=9797

/system script
add name=Exp_Auto policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive source="\
    #\BD\C5\B1\BE\BF\AA\CA\BC#\r\
    \n:global ip 120.85.13.10;\r\
    \n:global Date [/system clock get date];\r\
    \n:global Year ([:pick \$Date 7 11]-1);\r\
    \n:global Month ([:find jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec [:\
    pick \$Date 0 3]]);\r\
    \n:global Day [:pick \$Date 4 6];:if ([:pick \$Date 4 5] = 0) do={:set Day\
    \_[:pick \$Date 5 6]};:set Day (\$Day-1);\r\
    \n:global leapyear 0,31,59,90,120,151,181,212,243,273,304,334,0,31,60,91,1\
    21,152,182,213,244,274,305,335;\r\
    \n:global Today (\$Year*365+\$Year/4);\r\
    \n:if ((\$Year-\$Year/4*4) != 3) do={:set Today (\$Today+[:pick \$leapyear\
    \_\$Month]+\$Day)} else={:set Today (\$Today+[:pick \$leapyear (\$Month+12\
    )]+\$Day)};\r\
    \n#:global Week (\$Today-\$Today/7*7);\r\
    \n:log error (\"\BD\F1\CC\EC\CA\C7 : \" .\$Year+1 .\"-\". \$Month+1 .\"-\"\
    . \$Day+1 );\r\
    \n/ppp secret;\r\
    \n:foreach pppuse in [find disabled=no comment!=\"\"] do={\r\
    \n:local pcom [get \$pppuse comment];\r\
    \n:local pnam [get \$pppuse name];\r\
    \n:set pcom [:pick \$pcom 0 8];\r\
    \n:local CYear ([:pick \$pcom 0 4]-1);\r\
    \n:local CMonth ([:pick \$pcom 4 6]-1);\r\
    \n:local CDay ([:pick \$pcom 6 8]-1);\r\
    \n:local CToday (\$CYear*365+\$CYear/4);\r\
    \n:if ((\$CYear-\$CYear/4*4) != 3) do={:set CToday (\$CToday+[:pick \$leap\
    year \$CMonth]+\$CDay)} else={:set CToday (\$CToday+[:pick \$leapyear (\$C\
    Month+12)]+\$CDay)};\r\
    \n:if ([:len \$pcom] < 8) do={ :log error (\"error PPP comment user \" . \
    \$pnam);:beep frequency=2080; } else={\r\
    \n:if ((0<=(\$CToday - \$Today))&&((\$CToday - \$Today)<=3)) do={\r\
    \n/ppp secret set [/ppp secret find name=\$pnam] remote-address=\$ip;\r\
    \n/ppp active remove [/ppp active find name=\$pnam];\r\
    \n:log error (\"\D3\C3\BB\A7 : [ \". \$pnam .\" ]\" . \" \BB\E1\B1\BB\CD\
    \A3\D3\C3\D3\DA : \" .\$CYear+1 .\"-\". \$CMonth+1 .\"-\". \$CDay+1);\r\
    \n:set ip (\$ip+1);\r\
    \n}\r\
    \n:if (\$CToday - \$Today < 0) do={\r\
    \n/ppp secret disable [/ppp secret find name=\$pnam];\r\
    \n/ppp active remove [/ppp active find name=\$pnam];\r\
    \n:log error (\"\BD\FB\D3\C3\D3\C3\BB\A7 : [ \". \$pnam .\" ]\");\r\
    \n}}}\r\
    \n#\BD\C5\B1\BE\BD\E1\CA\F8#"

/system scheduler add disabled=no interval=1d name=ExpAuto on-event=Exp_Auto  policy=reboot,read,write,policy,test,password,sniff,sensitive start-date= jan/01/1970 start-time=03:00:00


/ip proxy set always-from-cache=no cache-administrator=webmaster cache-hit-dscp=4 cache-on-disk=no enabled=yes max-cache-size=none max-client-connections=600 max-fresh-time=3d max-server-connections=600 parent-proxy=0.0.0.0  parent-proxy-port=0 port=9797 serialize-connections=no src-address=0.0.0.0
/ip proxy access add action=deny comment="push to error" disabled=no dst-port=80
发表于 2016-12-3 14:20:48 | 显示全部楼层
看看怎么说的
发表于 2016-12-10 12:20:14 | 显示全部楼层
先mark下,刚入手ros,正在学习
发表于 2016-12-14 15:28:30 | 显示全部楼层
super valuable
发表于 2016-12-15 16:29:22 | 显示全部楼层
<此处字符重复过多!点击下方“编辑”进行修改。>
发表于 2016-12-19 14:11:10 | 显示全部楼层
感谢分享,跟您学习
发表于 2016-12-21 15:08:47 | 显示全部楼层
谢谢楼主谢谢楼主
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2025-5-1 09:23 , Processed in 0.294354 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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