ImageVerifierCode 换一换
格式:DOCX , 页数:14 ,大小:34.96KB ,
资源ID:12673633      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/12673633.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ROS策略及限速.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

ROS策略及限速.docx

1、ROS策略及限速ROS限速、防syn、ip伪装、mac绑定、防火墙、屏蔽端口、教程大全、VPN、ROS端口映射 2008-02-28 20:46节省磁盘资源!:foreach i in=/system logging facility find local=memory do=/system logging facility set $i local=noneRO防synip-firewall-connectionsTracking:TCP Syn Sent Timeout:50 TCP syn received timeout:30限线程脚本: :for aaa from 2 to 254

2、do=/ip firewall filter add chain=forward src-address=(192.168.0. . $aaa) protocol=tcp connection-limit=50,32 action=drop RO端口的屏蔽ip-firewall-Filer Rules里面选择forward的意思代表包的转发firewall rule-General Dst.Address:要屏蔽的端口 Protocol:tcpAction:drop(丢弃)ros限速手动限速winbox-queues-simple queues点“+”,NAME里随便填,下面是IP地址的确定T

3、arget Address 不管,Dst. Address里填 你要限制的内网机器的IP,比如我这里有个 1号机器 IP为 192.168.1.101,那dst.address 里就填 192.168.1.101 然后是/32(这里的32不是指掩码了,个人理解为指定的意思)!interface里 记着要选你连接外网那个卡,我这里分了“local和public”,所以选public 其他的不管,我们来看最重要的东西拉,Max limit ,这个东西是你限制的上限,注意的是 这里的数值是比特位,比如我要限制 下载的速度为 500K 那么就填入多少呢? 500 X 1000 X 8=400 0000

4、=4M。 另外,很多朋友都有个疑问,到底一般的用户会有多大流量呢?一般的网络游戏,如 梦幻西游 传奇 封神榜 等等,其下行在 20Kbps以内! 最耗网络资源的就是下载-我们就是为了限制它拉,其次是VOD点播,一般DVD格式的大约要 2M多吧,所以你看情况限制拉 别搞的太绝!限速脚本: :for aaa from 2 to 254 do=/queue simple add name=(queue . $aaa) dst-address=(192.168.0. . $aaa) limit-at=0/0 max-limit=2000000/2000000 说明: aaa是变量 2 to 254是2

5、254 192.168.0. . $aaa是IP 上两句加起来是192.168.0.2192.168.0.254 connection-limit=50是线程数这里为50 max-limit=2000000/2000000是上行下行 使用: WinBox-System-Scripts- Name(脚本名程) Source(脚本) OK-选择要运行的脚本-Run Script ROS限速的极致应用一般我们用ros限速只是使用了max-limit,其实ros限速可以更好的运用。比如我们希望客户打开网页时速度可以快一些,下载时速度可以慢一些。ros2.9就可以实现。max-limit-我们最常用的地

6、方,最大速度burst-limit-突破速度的最大值burst-thershold-突破速度的阀值burst-time-突破速度的时间值解释一下图片的限制意义当客户机在30秒(burst-time)内的平均值小于突破速度阀值(burst-thershold)180K时,客户机的最大下载速率可以超过最大限速值(max-limit)200K,达到突破最大值(burst-limit)400K,如果30秒内平均值大于180K,那客户机的最大速度只能达到200K。这样也就是当我们开网页时可以得到一个更大的速度400K,长时间下载时速度只能得到200K,使我们的带宽可以更有效的利用动态限速ROS动态限速(

7、检测外网总速度进行限速开关)废话不说先看脚本原理:以下操作全部在WINBOX界面里完成介绍:可以实现在总速度不超过9M的情况下自动关闭所有生成的限速规则在总速度超过18M的时候自动启动所有生成的限速规则。说明:在输入脚本内容时不要把两边的()带上,那个是为了区分非脚本字符。 总速度=你的外网网卡当前速度。打开 /system/scripts脚本:for aaa from 1 to 254 do=/queue simple add name=(ip_ . $aaa) dst-address=(192.168.0. . $aaa) interface=wan max-limit=256000/80

8、0000 burst-limit=1000000/3000000 burst-threshold=128000/512000 burst-time=30s/1m 上面是生成限速树,对网段内所有IP的限速列表!下面进入正题:脚本名:node_on脚本内容:(:for aaa from 1 to 254 do=/queue sim en find name=(ip_ . $aaa))脚本名:node_off脚本内容:(:for aaa from 1 to 254 do=/queue sim dis find name=(ip_ . $aaa))scripts(脚本部分)以完成打开 /tools/t

9、raffic monitor新建:名:node_18M traffic=received trigger=above on event=node_on threshold:18000000新建: 名:node_9M traffic=received trigger=below on event=node_off threshold:9000000在输入脚本内容时不要把两边的()带上,那个是为了区分非脚本字符。RO映射ip-firewall-Destination NATGeneral-In. Interface all(如果你是拨号的就选择pppoe的、固定IP选择all即可) Dst. Ad

10、dress:外网IP/32 Dst. Port:要映射的端口 Protocol:tcp(如果映射反恐的就用udp)Action action:nat TO Dst.Addresses:你的内网IP TO Dst.Ports:要映射的端口ip伪装ip-firewall-Source NATAction Action:masquerade(IP伪装)回流(因为假如说在本网吧做SF需要回流)ip-firewall-Source NAT在general-Src.address: 192.168.0.0/24 这里特殊说明下 内网ip段 24代表定值不可修改RO的IP:mac绑定绑定:foreach i

11、 in=/ip arp find dynamic=yes do=/ip arp add copy-from=$i 解除绑定:foreach i in=/ip arp find do=/ip arp remove $i完了在interfaces里面选择内网在选择reply-onlyRO设置的备份(两总方法)files-file listbackup即可(可以到你的ftp里面找)背份资料命令行:system回车backup回车save name=设置文件名 回车资料恢复命令system回车backup回车load name=文件名 回车RO禁ping/ ip firewall rule input

12、 add protocol=icmp action=drop comment=Drop excess pings disabled=no解pingip-firewall-filter rulesinput:将其屏蔽或者删掉关于mac地址扫描/tool mac-scan allVPN与ppp建立用户在interfaces-settings-pptp serverEnabled选择 mtu1500 mru:1500keepalive Timeout:disableddefault Profiles: defaultAuthentication: 下面打上四个对号(这也代表服务器启动)ip-pool

13、-ip poolpptp=192.168.0.150-192.168.0.160(此IP段为内网中没有在用的段)pptp1=192.168.0.170-192.168.0.180(此IP段为内网中没有在用的段)自己总结出来的,有人问,为什么要写2个ip段一个不也行吗。这也是我自己的心得,我想看到这个资料的人也不是一般人。呵呵因为在vpn连接的时候我们要给他分配一个远程的主机ip做为网关。在本配一个本地的做为ip。所以选择了2个,往下看在ppp-Secrets new ppp secret service:pptp routes:可以添加网关(一般VPN都是默认录找网关可添可不添)Profile

14、s: Local Address:在这里我添加的是pptp Remote Address:在这里我添加的是pptp1dns,建议最好填写:下面有两个 use Encryption Require Encryption 代表加密Limits:Tx bit Rate)用来限速的最大值Rx bit Rate)用来限速的最小值这也就表明了,远程给他一个地址,本地给他一个地址,这样可以更好的来识别。最重要的,就是,基本每次都能拨上来。可能有很多人说我能拨你家电信,为啥不能拨网通,我来告诉你答案因为isp的关系。在这里我就不详细说明了。拨好的时候我就不说了,如果有问题在来问我。检查磁盘在路由或终端模拟下用

15、下面命令:systemcheck-disk检查磁盘,要重启。 但是很慢,一分钟一G。哈哈关机可以在WINBOX中关机,也可以用命令关:systemsh即可。自我感觉不好使如果有一些网页打不开,你ISP的MTU=1492,请在IP Firewall Mangle 单击红加号 Protocol选择TCP Tcp Options 选择 sync Actions选择 accept TCP MSS:1448。ipfirewall -filter fules ,选择 号,in interface 选择内网网卡(local),其他默认 这条路由允许来自内网的连接,如果有限制,可以修改 src address

16、 的ip段,或者content 内容过滤 ip firewall filter chains 选中 input ,选择 drop 这条规则禁止所有的外部连接 以上两条规则,屏蔽来自外网的所有连接 一些恶意网站和广告,也可以从这里屏蔽 关于解决不能上XX的问题把TCP MSS 1448改成1432记录网卡MAC地址才能限制网卡上网。具体设置如下。 在防火墙里面的filter rules项选择forward然后添加一项设定也就是“”号, 在advanced项里面的src .mac.address项里面加入网卡的MAC地址,然后在ACTION中选择DROP项。这样子添加后,那块网卡的ip地址无论咋换

17、,都无法上网。除非它把网卡换了。我就是这样子作出来得,效果不错。如果改了端口用winbox打不开了的解决方法用SSH进入/ip ser /ip ser/set www port 80/ip ser/set ftp port 21解决因防火墙屏蔽来自内网的所有连接进入后输入 /ip f ru o 可打开OUTPUT 输入 /ip f ru in 可打开INPUT再、输入p 可看结果按REM O(此0为数字)可删除相应0的规则你输入/ip f set i p a 可恢复系统默认input改回accept。或者,使用system 里面的reset 复位路由(会删除所有规则)adminMikroTik

18、 system reset (系统自动复位清除设置并重新启动)启用dns缓存CODE adminMikroTik ip dns set allow-remote-requests=yes adminMikroTik ip dns .user 管理员只能在内网登陆set 0 address=192.168.0.0/24将规则另存为*.rsc文件,进入控制台,或者在路由器本机上,输入 import *.rsc该规则导入完成基本也就这些了,还有自己知道的,也说不出来的,在有写东西是我自己在网络中找的。本人都已经测试过了。斩断扫描ROS的黑手以下是引用片段:/ip firewall filter ad

19、d chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list=port scanners address-list-timeout=14d comment=Port scanners to list disabled=no/ip firewall filter add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list=por

20、t scanners address-list-timeout=14d comment=NMAP FIN Stealth scan/ip firewall filter add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list=port scanners address-list-timeout=14d comment=SYN/FIN scan/ip firewall filter add chain=input protocol=tcp tcp-flags=syn,rs

21、t action=add-src-to-address-list address-list=port scanners address-list-timeout=14d comment=SYN/RST scan/ip firewall filter add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list=port scanners address-list-timeout=14d comment=FIN/PSH/URG scan/i

22、p firewall filter add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list address-list=port scanners address-list-timeout=14d comment=ALL/ALL scan/ip firewall filter add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-l

23、ist address-list=port scanners address-list-timeout=14d comment=NMAP NULL scan/ip firewall filter add chain=input src-address-list=port scanners action=drop comment=dropping port scanners disabled=no RouterOS终极提速,彻底解决ROS小包(网络游戏数据包)转发性能差的问题RouterOS终极提速,彻底解决ROS小包(网络游戏数据包)转发性能差的问题以下只给有ROS基础的人看,2.9.7以上版

24、本支持,2.9.26上调试通过ROS终端界面直接输入即可HTB QOS 流量质量控制/ ip firewall mangle add chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn passthrough=yes comment= disabled=no add chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p passthrough=yes comment= disabled=no

25、 add chain=forward connection-mark=!p2p_conn action=mark-packet new-packet-mark=general passthrough=yes comment= disabled=no add chain=forward packet-size=32-512 action=mark-packet new-packet-mark=small passthrough=yes comment= disabled=no add chain=forward packet-size=512-1200 action=mark-packet ne

26、w-packet-mark=big passthrough=yes comment= disabled=no/ queue tree add name=p2p1 parent=TEL packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=p2p2 parent=LAN packet-mark=p2p limit-at=2000000 queue=default pr

27、iority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=ClassA parent=LAN packet-mark= limit-at=0 queue=default priority=8 max-limit=100000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=ClassB parent=ClassA packet-mark= limit-at=0 queue=d

28、efault priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=Leaf1 parent=ClassA packet-mark=general limit-at=0 queue=default priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=Leaf2 parent=ClassB packet-mark=small limit-at=0

29、 queue=default priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=Leaf3 parent=ClassB packet-mark=big limit-at=0 queue=default priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no1-8级优先级控制,数字越小优先级越高LAN内网接口TEL 外网接口SMALL 小包 32-512字节 5级优先级BIG 大包 512-1200字节 6级优先级general 其它包 1200-1500字节

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1