文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机硬件及网络 > ros脚本
侵权投诉

ros脚本

ros脚本

ce pppoe-client enable pppoe-out3
/ ip address add address=11.0.0.3/32 interface=pppoe-out3 comment="adsl"3
/ ip route add gateway=11.0.0.3 routing-mark=adsl3 comment=adsl3

/ ip route add gateway=11.0.0.1 comment=main


mangle数据包标记
/ ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=2,3,0 \
action=mark-connection new-connection-mark=adsl1 passthrough=yes
add chain=prerouting in-interface=lan connection-mark=adsl1 action=mark-routing \
new-routing-mark=adsl1 passthrough=no
add chain=prerouting in-interface=lan connection-state=new nth=2,3,1 \
action=mark-connection new-connection-mark=adsl2 passthrough=yes
add chain=prerouting in-interface=lan connection-mark=adsl2 action=mark-routing \
new-routing-mark=adsl2 passthrough=no
add chain=prerouting in-interface=lan connection-state=new nth=2,3,2 \
action=mark-connection new-connection-mark=adsl3 passthrough=yes
add chain=prerouting in-interface=lan connection-mark=adsl3 action=mark-routing new-routing-mark=adsl3 passthrough=no




3条adsl自动获取动态ip脚本


:local assign-address
:local new-address
:local status
:local x
:set x 3
:for i from=1 to=$x do={
:set status [/interface get [/interface find name=("pppoe-out" . $i)] running]
:if ($status=true) do={
:set new-address [/ip address get [/ip address find dynamic=yes interface=("pppoe-out" . $i)] address]
:set new-address [:pick $new-address 0 [:find $new-address "/"]]
:set assign-address [/ip address get [/ip address find dynamic=no interface=("pppoe-out" . $i)] address]
:set assign-address [:pick $assign-address 0 [:find $assign-address "/"]]
:if ($assign-address != $new-address) do={
/ip address set [/ip address find comment=("adsl" . $i)] address=$new-address network=$new-address broadcast=$new-address
/ip route set [/ip route find comment=("adsl" . $i)] gateway=$new-address
:if ($i=1) do={/ip route set [/ip route find comment=main] gateway=$new-address}
}
}
}

nth规则

/ip firewall nat remove nth1
/ip firewall nat remove nth2
/ip firewall nat remove nth3
:local new-address
:set x 3
:for i from =1 to=$x do={
:set new-address [/ip address get [/ip address find dynamic=yes interface=("pppoe-out" . $i)] address]
:set new-address [:pick $new-address 0 [:find $new-address "/"]]
/ ip firewall nat
add chain=srcnat connection-mark=("adsl" . $i) action=src-nat to-addresses=$new-address to-ports=0-65535 comment=("nth" . $i)
}


ddns动态域名解析

:log info "DDNS: Begin"
:global ddns-user "name"
:global ddns-pass "pass"
:global ddns-host "user.changeip.net"
:global ddns-interface "pppoe-out3"
:global ddns-ip [ /ip address get [/ip address find interface=$ddns-interface] address ]
:log info "DDNS: Sending Update!"
:log info [ /tool dns-update name=$ddns-host address=[:pick $ddns-ip 0 [:find $ddns-ip "/"] ] key-name=$ddns-user key=$ddns-pass ]
:log info "DDNS: End"

netlimiter 限速

:for i fr

上一页第3页

你可能喜欢

热门文档

相关文档

  • ROS脚本大全(通用)

    ROS 脚本大全(通用) 一:限速脚本 :for wbsz from 1 to 254 do={/queue simple add name=(wbsz . $wbsz) dst-address=(192.168.0. . $wbsz) limit-...

  • ros 脚本详细解释

    ros 脚本详细解释 +++ 在3.22下:put ((221.232.119.228 & 255.255.255.0)./24) 并不能得到221.232.119.0/24 正确的方法是:put ((221.232.119....

  • ROS常用脚本

    ROS封杀常用P2P策略脚本: / ip firewall filter add chain=input protocol=udp dst-port=137-138 action=drop comment="drop udp137-138" # 讯雷 add chain=...

  • ROS脚本大全

    ROS 脚本大全(可通用) 本文总结了一些常用的 ROS 脚本,希望对大家有帮助! 禁止 ip 上网脚本: :for aaa from 2 to 254 do={/ip firewall filter chain=forw...

  • ROS脚本命令详解

    ROS脚本命令详解_IT/计算机_专业资料。四种变量 global - 定义全局变量, 可以要所有的脚本中调用共享 local - 定义本地变量,只能在其所要的脚本下调用,不能被其...

  • ROS详细脚本

    (做完ROS后,先不绑,打开所有电脑后,在执行下面的命令。直接复制到WINBOX终端运行就可以了) / interface ethernet set lan arp=reply-only 解除ARP绑定 lan 为...

  • ROS脚本语法使用教程

    ROS脚本语法使用教程_计算机硬件及网络_IT/计算机_专业资料。ROS脚本语法使用教程 ,快速学习ROS脚本手册:脚本编写 1 手册:脚本编写 适用RouterOS版本: v3, v4及以上...

  • ros防火墙脚本

    ros防火墙脚本_计算机硬件及网络_IT/计算机_专业资料。企业专用ros防火墙脚本,经测试稳定ROS防火墙脚本 经常需要用的ros脚本的朋友可以看下 # feb/18/2006 22:28:...

  • ROS基本防护脚本

    ROS基本防护脚本_IT/计算机_专业资料。简单的一些文档本适用于 ROS 2.9.2.7 保存以下脚本后缀改为 rsc,用 winbox 上传到路由上, 用命令:import 文件名 导入...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email