刘大喵

RouterOS打开网页强制跳转到指定服务器
今天群友有这个需求就写了个脚本,不过也是有很久没更新文章了,哈哈。#映射命令 ip firewall nat a...
扫描右侧二维码阅读全文
22
2016/05

RouterOS打开网页强制跳转到指定服务器

今天群友有这个需求就写了个脚本,不过也是有很久没更新文章了,哈哈。

#映射命令
ip firewall nat add chain=dstnat action=dst-nat to-addresses=修改为自己的服务IP to-ports=80 protocol=tcp src-address-list=Client-ip dst-port=80  disabled=yes
#设置强制跳转时间
ip firewall mangle add chain=prerouting action=add-src-to-address-list protocol=tcp src-address-list=!Client-ip_2 address-list=Client-ip address-list-timeout=5s dst-port=80  disabled=yes
#设置刷新间隔
ip firewall mangle add chain=prerouting action=add-src-to-address-list protocol=tcp src-address-list=Client-ip address-list=Client-ip_2 address-list-timeout=5m dst-port=80 disabled=yes

来自Routeos入门

If you think my article is useful to you, please feel free to appreciate

Leave a Comment