| 
 | 
 
马上注册成为ROSABC会员,随时发帖回复。
您需要 登录 才可以下载或查看,没有账号?会员注册 
 
 
 
x
 
Web 代理应用事例 通过使用 web-proxy 禁止网站和禁止下载 首先配置 web-proxy,配置参数如下: 
 
 
[RouterOS@ROSABC] /ip proxy> prin enabled: yes 
src-address: 0.0.0.0 port: 8080 
parent-proxy: 0.0.0.0 parent-proxy-port: 0 
cache-drive: system 
cache-administrator: "webmaster" max-cache-size: none 
cache-on-disk: no 
max-client-connections: 1200 max-server-connections: 1200 
max-fresh-time: 1d serialize-connections: no 
always-from-cache: no 
cache-hit-dscp: 4 
 
 
 
现在,设置透明传输数据重定向,将所有访问 80 端口的数据重定向到 web-proxy 的 8080 端口上: 
 
/ip firewall nat 
chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 
 
 
 
 
确定你路由器本地的 Proxy 没有打开代理,并禁止外网通过路由器代理上网: 
 
/ip firewall filter 
chain=input in-interface=<Your WAN Port> src-address=0.0.0.0/0 protocol=tcp dst-port=8080 action=drop 
 
设置禁止访问网站,该设置将禁止访问 http://www.163.com 
 
/ip proxy access 
dst-host=www.163.com action=deny 
 
我们可用阻止文件如“.mp3, .exe, .dat, .avi”的下载。 
 
/ip proxy access  
path=*.exe action=deny  
path=*.mp3 action=deny  
path=*.zip action=deny 
path=*.rar action=deny 
 
 
 
 
同样我可用阻止所有含“mail”的关键字链接 
 
/ip proxy access 
dst-host=:mail action=deny 
 
 |   
 
 
 
 |