ftp目录 /rw/pckg
将ROS硬盘挂载到其它的系统里.
mount /dev/sda2 /tmp
新建一个目录. 权限设置为775
mkdir /tmp/rw/pckg/http &&chmod 775 /tmp/rw/pckg/http
vi /tmp/etc/rc.d/rd.sysinit
将下面内容添加到exit行的上面
[ ! -f /rw/pckg/http ] &&ln -s /home/web /var/pckg/http
二种方法都能实现跳转,我的网络是内网IP分流,
# jul/08/2011 13:59:56 by RouterOS 3.30
# software id = PIYV-S309
#
/ip firewall mangle
add action=add-src-to-address-list address-list=src2 address-list-timeout=1s \
chain=prerouting comment=”" disabled=no dst-port=80 protocol=tcp \
src-address=192.168.0.105-192.168.0.107 src-address-list=!src1
add action=add-src-to-address-list address-list=src1 address-list-timeout=1m \
chain=prerouting comment=”" disabled=no dst-port=80 protocol=tcp \
src-address=192.168.0.105-192.168.0.107 src-address-list=src2
/ip firewall nat
add action=redirect chain=dstnat comment=”" disabled=no dst-port=80 protocol=\
tcp src-address-list=src2 to-ports=8080
/ip proxy
set always-from-cache=no cache-administrator=webmaster cache-hit-dscp=4 \
cache-on-disk=no enabled=yes max-cache-size=unlimited \
max-client-connections=600 max-fresh-time=3d max-server-connections=600 \
parent-proxy=0.0.0.0 parent-proxy-port=0 port=8080 serialize-connections=\
no src-address=0.0.0.0
/ip proxy access
add action=deny comment=”" disabled=no dst-port=80 redirect-to=\
192.168.0.247/index.html
这方法的mangle的顺序别搞错。
另一方法
ROS首页强开配置
/ip firewall nat
add action=dst-nat chain=dstnat comment=ToAddress disabled=no dst-port=80 protocol=tcp src-address-list=src1 to-addresses=192.168.100.1 to-ports=80
/ip firewall mangle
add action=add-src-to-address-list address-list=src1 address-list-timeout=3s chain=prerouting comment=TimeOut1 disabled=no dst-port=80 protocol=tcp src-address-list=!src2
add action=add-src-to-address-list address-list=src2 address-list-timeout=3h chain=prerouting comment=TimeOut2 disabled=no dst-port=80 protocol=tcp src-address-list=src1
备注:
1,192.168.100.1为内网首页强开WEB服务器IP。
2,强开3秒,强开过的IP在3小时内不会再强开。
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)