免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: zhangtm_1
打印 上一主题 下一主题

[网络管理] 能否在网关上实现数据传输只进不出 [复制链接]

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
11 [报告]
发表于 2007-05-21 17:44 |只看该作者
原帖由 zhangtm_1 于 2007-5-21 17:40 发表于 11楼  
具体需求是不让网内发贴,聊天,网络游戏,只让浏览网页,下载数据.


这也不难,在SQUID中设置过滤规则,过滤掉IP地址方式上网,过滤掉chat bbs等聊天、BBS的关键字。
至于网络游戏吗,你的LINUX网关不开转发服务,只做成SQUID代理。在SQUID代理中封掉CONNECT方法。一切都解决了。

论坛徽章:
0
12 [报告]
发表于 2007-05-21 19:18 |只看该作者
原帖由 ssffzz1 于 2007-5-21 17:44 发表于 12楼  


这也不难,在SQUID中设置过滤规则,过滤掉IP地址方式上网,过滤掉chat bbs等聊天、BBS的关键字。
至于网络游戏吗,你的LINUX网关不开转发服务,只做成SQUID代理。在SQUID代理中封掉CONNECT方法。一切都解决了。

这个方法能够起到一定的抑制作用,但用过滤ip的方法仍然能过发贴,在SQUID代理中封掉CONNECT就不能下载数据了

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
13 [报告]
发表于 2007-05-21 20:23 |只看该作者
原帖由 zhangtm_1 于 2007-5-21 19:18 发表于 13楼  

这个方法能够起到一定的抑制作用,但用过滤ip的方法仍然能过发贴,在SQUID代理中封掉CONNECT就不能下载数据了



我说的过滤IP方式上网,是在SQUID中做过滤,防止过滤掉域名上网的人再用IP上。
你对CONNECT的方法理解有错误,在SQUID中封掉CONNECT方法,仅仅是不能让SQUID做其他协议的代理,譬如QQ的HTTP代理。
“方法”在SQUID中有专门的含义,并不是我们生活中传统的方法所代表的含义。譬如SQUID在做数据类传输的代理的时候用的是CONNECT方法。

论坛徽章:
0
14 [报告]
发表于 2007-05-22 09:14 |只看该作者
在squid中有个关于头的大小的限制,如果是上传的话,头应该是很大的,如果只是访问某个网页,或者是下载文件,那么http的头的字节是很少的,你可以一点一点增加,应该大致能够做到你的要求

这是控制上传的:
#  TAG: request_header_max_size (KB)
#       This specifies the maximum size for HTTP headers in a request.
#       Request headers are usually relatively small (about 512 bytes).
#       Placing a limit on the request header size will catch certain
#       bugs (for example with persistent connections) and possibly
#       buffer-overflow or denial-of-service attacks.
#
#Default:
# request_header_max_size 20 KB

#  TAG: request_body_max_size   (KB)
#       This specifies the maximum size for an HTTP request body.
#       In other words, the maximum size of a PUT/POST request.
#       A user who attempts to send a request with a body larger
#       than this limit receives an "Invalid Request" error message.
#       If you set this parameter to a zero (the default), there will
#       be no limit imposed.
#
#Default:
# request_body_max_size 0 KB

--------------
下面这些是控制下载的:
#  TAG: reply_header_max_size   (KB)
#       This specifies the maximum size for HTTP headers in a reply.
#       Reply headers are usually relatively small (about 512 bytes).
#       Placing a limit on the reply header size will catch certain
#       bugs (for example with persistent connections) and possibly
#       buffer-overflow or denial-of-service attacks.
#
#Default:
# reply_header_max_size 20 KB

#  TAG: reply_body_max_size     bytes allow|deny acl acl...
#        This option specifies the maximum size of a reply body in bytes.
#       It can be used to prevent users from downloading very large files,
#       such as MP3's and movies. When the reply headers are recieved,
#       the reply_body_max_size lines are processed, and the first line with
#       a result of "allow" is used as the maximum body size for this reply.
#       This size is checked twice. First when we get the reply headers,
#       we check the content-length value.  If the content length value exists
#       and is larger than the allowed size, the request is denied and the
#       user receives an error message that says "the request or reply
#       is too large." If there is no content-length, and the reply
#       size exceeds this limit, the client's connection is just closed
#       and they will receive a partial reply.
#
#       WARNING: downstream caches probably can not detect a partial reply
#       if there is no content-length header, so they will cache
#       partial responses and give them out as hits.  You should NOT
#       use this option if you have downstream caches.
#
#       If you set this parameter to zero (the default), there will be
#       no limit imposed.
#
#Default:
# reply_body_max_size 0 allow all

[ 本帖最后由 springwind426 于 2007-5-22 09:22 编辑 ]

论坛徽章:
0
15 [报告]
发表于 2007-05-25 16:51 |只看该作者
原帖由 ssffzz1 于 2007-5-21 17:44 发表于 12楼  


这也不难,在SQUID中设置过滤规则,过滤掉IP地址方式上网,过滤掉chat bbs等聊天、BBS的关键字。
至于网络游戏吗,你的LINUX网关不开转发服务,只做成SQUID代理。在SQUID代理中封掉CONNECT方法。一切都解决了。

如果你的squid服务器配置不高的话最好少定点规则,否则会明显慢下来.

论坛徽章:
0
16 [报告]
发表于 2007-05-25 17:19 |只看该作者
顶一下,高手云集啊!

论坛徽章:
0
17 [报告]
发表于 2007-06-06 15:59 |只看该作者
简单
IPTABLES REDIRECT到squid
squid设置透明代理
将squid上传限制设置到1k左右就行了

论坛徽章:
0
18 [报告]
发表于 2007-06-06 16:52 |只看该作者
补充一下
request_body_max_size 1k
header_size不用改的

论坛徽章:
0
19 [报告]
发表于 2007-06-06 20:40 |只看该作者
昏,三向交握是什么意思啊? 能只进不出吗??

论坛徽章:
0
20 [报告]
发表于 2007-06-07 07:44 |只看该作者
原帖由 zhangtm_1 于 2007-5-21 17:40 发表于 11楼  
具体需求是不让网内发贴,聊天,网络游戏,只让浏览网页,下载数据.



真正实施起来困难不少。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP