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

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 6763|回复: 1

[交流] RouteROS软路由 2.9.x 强制主页 大家看看

[复制链接]
发表于 2011-4-28 20:18:51 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x
我想问的问题是 RouteROS软路由 2.9x 的

强制主页的 问题

脚本我测试过 也有 但是都是基于 强制 IP 加端口的


:local StrToAddress
t StrToAddress 192.168.0.1
:local StrToPort
t StrToPort 8887
:local StrTimeOut1
t StrTimeOut1 2s
:local StrTimeOut2
t StrTimeOut2 3h
ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 src-address-list=!src2
action=add-src-to-address-list address-list=src1 address-list-timeout=$StrTimeOut1 comment=TimeOut1
ip firewall mangle add chain=prerouting protocol=tcp dst-port=80
action=add-src-to-address-list address-list=src2 address-list-timeout=$StrTimeOut2 comment=TimeOut2
ip firewall nat add chain=dstnat protocol=tcp dst-port=80 src-address-list=src1
action=dst-nat to-addresses=$StrToAddress to-ports=$StrToPort comment=ToAddress

这个脚本能是能行
但是我想改进下 以为我没有固定IP 做支持

我做的网站是假设在 ADSL 上的 用了 DDNS

我想把这个改成 强制主页 但是 强制访问 主页用 域名实现的

就是能在脚本里面直接添加域名 来实现 不用 解析域名 在传IP 参数的

直接在脚本里面 比如说强制 www.qq.com 之类 脚本

谢谢你了 大哥
发表于 2011-4-30 23:46:11 | 显示全部楼层
前面有个大哥给我一个办法 先解析域名 然后得到 IP

但是 好多自己的空间 还有网站 是那种的

反正不行  真的

我想把要强制的域名 比如说www.qq.com 直接写在脚本里面
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

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

GMT+8, 2024-5-19 18:01 , Processed in 0.103193 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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