找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: River

[其它] 怎么设置记录所有内网机器上网log?

[复制链接]
发表于 2005-4-4 14:08:43 | 显示全部楼层
1、启用web-proxy(我做的是透明代理)

CODE
set enabled=yes src-address=0.0.0.0 port=8080 hostname="" transparent-proxy=yes parent-proxy=0.0.0.0:0 \ ?ache-administrator="webmaster" max-object-size="4096 kB" cache-drive=system max-cache-size=unlimited
2、启用透明代理转发

CODE
/ ip firewall dst-nat add in-interface=lan dst-address=!192.168.x.x/32:80 protocol=tcp action=redirect to-dst-port=8080 comment="" \ ?isabled=no
3、再找一台机(如192.168.0.253)做一个syslog记录服务器.(做syslog服务的过程在论坛里找下看看)4、修改system为远程记录.(不改也可以,但是以后查找记录就麻烦了)

CODE
/ system logging set default-remote-address=192.168.0.253 default-remote-port=514 disk-buffer-lines=100 memory-buffer-lines=100 / system logging facility set Web-Proxy-Access local=none remote=syslog remote-address=192.168.0.253 remote-port=514 prefix="" echo=no
5、使用 /ip web-proxy monitor ,可以看到如下类似信息

QUOTE
status: running uptime: 3d18h54m52sclients: 207 requests: 764361 hits: 313758 cache-size: 2362468 kBreceived-from-servers: 33320335 kBsent-to-clients: 34109552 kB hits-sent-to-clients: 850357 kB
这说明web-proxy已经在正常运行,再到你的那台syslog记录服务器里面查看syslog的记录就可以看到网页浏览记录了。注意的是,如果是带动的机器比较多的时候对做web-proxy的机器要求也比较高,我这里用1.8G的机器(普通机器),带150台机器,cpu使用率不超过40%,但是带动1000台左右的机器时,就不行了,cpu使用率总是100%。也不知道是硬盘还是cpu、或者内存不够的问题(才用256M,单位不肯出钱买机器啊,只好找些破旧的机器来装routerOS顶替了)
routeros
回复

使用道具 举报

发表于 2005-4-7 09:51:01 | 显示全部楼层
顶出来,才好找
routeros
回复

使用道具 举报

发表于 2005-4-7 10:15:08 | 显示全部楼层
我的作法很简单,在防火墙哪里forward添加一条规则,协议选tcp,目标端口:80,action:accept并且把log勾上,然后MT syslog做记录就ok了。
routeros
回复

使用道具 举报

发表于 2005-4-11 10:14:22 | 显示全部楼层
QUOTE (zzzZZZ @ Apr 7 2005, 10:15 AM)
我的作法很简单,在防火墙哪里forward添加一条规则,协议选tcp,目标端口:80,action:accept并且把log勾上,然后MT syslog做记录就ok了。
使用你这种办法看不出客户端访问的是什么网站,只能看到客户Ip和服务器IP,看不出访问的是什么网站。用web-proxy的办法可以查看到比较容易辨别的记录,客户IP、访问网站、访问时间都有了,正符合记录上网记录的要求。如下:

CODE
1113214256.015     27 192.xxx.xxx.75 TCP_HIT/200 5491 GET [URL=http://album5.chinaren.com/ad/alumni/frame/class_idx_sms_ad.html]http://album5.chinaren.com/ad/alumni/frame...idx_sms_ad.html[/URL] - NONE/- text/html in 11-Apr 10:8:55.54 from 192.xxx.xxx.81113214256.015     27 192.xxx.xxx.75 TCP_HIT/200 4492 GET [URL=http://album5.chinaren.com/ad/alumni/frame/class_idx_right_linkad.html]http://album5.chinaren.com/ad/alumni/frame...ght_linkad.html[/URL] - NONE/- text/html in 11-Apr 10:8:55.54 from 192.xxx.xxx.81113214256.130    142 192.xxx.xxx.75 TCP_MISS/200 4889 GET [URL=http://channel.cpc.sohu.com/cpc/key_random_ad]http://channel.cpc.sohu.com/cpc/key_random_ad[/URL]? - DIRECT/220.181.26.53 text/html in 11-Apr 10:8:55.67 from 192.xxx.xxx.98
routeros
回复

使用道具 举报

发表于 2008-8-1 14:24:09 | 显示全部楼层
hhhhhhhhhhhhhhhhhhh
routeros
回复

使用道具 举报

发表于 2008-8-4 09:07:40 | 显示全部楼层
真不错
routeros
回复

使用道具 举报

发表于 2009-3-14 12:59:15 | 显示全部楼层
标记
routeros
回复

使用道具 举报

发表于 2009-3-14 13:07:25 | 显示全部楼层
留个脚印
routeros
回复

使用道具 举报

发表于 2009-3-14 13:57:00 | 显示全部楼层
无聊的公安..这种log交得出给他.方便他看吗?
routeros
回复

使用道具 举报

发表于 2009-3-14 20:54:38 | 显示全部楼层
不错,支持一下!!!!
routeros
回复

使用道具 举报

发表于 2009-3-19 11:05:25 | 显示全部楼层
cracy能说一下详细的步骤吗?
routeros
回复

使用道具 举报

发表于 2009-3-19 11:21:57 | 显示全部楼层
有收获呀
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-29 00:21 , Processed in 0.056395 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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