Server - System - Manager - CentOS, Operation System, VBB, HACKING AND SECURITY

Go Back   Server - System - Manager - CentOS, Operation System, VBB, HACKING AND SECURITY > CentOS Việt Nam - Viet Nam Linux CentOS Community > Cài đặt CentOS và ứng dụng > Proxy Server

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2008
Lovelinux's Avatar
Super Moderator
 
Join Date: Jun 2008
Posts: 221
Thanks: 22
Thanked 46 Times in 24 Posts
Default Cấm xem phim, ca nhạc dùng Squid

Các bạn tham khảo ACL deny xem phim nhạc online.

acl fails rep_mime_type ^.*mms.*
acl fails rep_mime_type ^.*ms-hdr.*
acl fails rep_mime_type ^.*x-fcs.*
acl fails rep_mime_type ^.*x-ms-asf.*

acl fails2 urlpath_regex dvrplayer mediastream mms://
acl fails2 urlpath_regex \.asf$ \.afx$ \.flv$ \.swf$

acl deny_rep_mime_flashvideo rep_mime_type -i video/flv
acl deny_rep_mime_shockwave rep_mime_type -i ^application/x-shockwave-flash$

acl x-type req_mime_type -i ^application/octet-stream$
acl x-type req_mime_type -i application/octet-stream
acl x-type req_mime_type -i ^application/x-mplayer2$
acl x-type req_mime_type -i application/x-mplayer2
acl x-type req_mime_type -i ^application/x-oleobject$
acl x-type req_mime_type -i application/x-oleobject
acl x-type req_mime_type -i application/x-pncmd
acl x-type req_mime_type -i ^video/x-ms-asf$
acl x-type2 rep_mime_type -i ^application/octet-stream$
acl x-type2 rep_mime_type -i application/octet-stream
acl x-type2 rep_mime_type -i ^application/x-mplayer2$
acl x-type2 rep_mime_type -i application/x-mplayer2
acl x-type2 rep_mime_type -i ^application/x-oleobject$
acl x-type2 rep_mime_type -i application/x-oleobject
acl x-type2 rep_mime_type -i application/x-pncmd
acl x-type2 rep_mime_type -i ^video/x-ms-asf$
acl webRadioReq req_mime_type -i ^video/x-ms-asf$
acl webRadioReq req_mime_type -i ^application/vnd.ms.wms-hdr.asfv1$
acl webRadioReq req_mime_type -i ^application/x-mms-framed$
acl webRadioRep rep_mime_type -i ^video/x-ms-asf$
acl webRadioRep rep_mime_type -i ^application/vnd.ms.wms-hdr.asfv1$
acl webRadioRep rep_mime_type -i ^application/x-mms-framed$
acl WMP browser Windows-Media-Player/*
http_access deny webRadioRep
http_access deny WMP
http_access deny fails
http_access deny fails2
http_access deny x-type
http_access deny x-type2

Chúc các bạn thành công.
Reply With Quote
  #2 (permalink)  
Old 11-09-2008
Lovelinux's Avatar
Super Moderator
 
Join Date: Jun 2008
Posts: 221
Thanks: 22
Thanked 46 Times in 24 Posts
Default ấu hình squid chứng thực bằng ncsa và cho thời gian hết hạn của user theo ý mình

cấu hình squid chứng thực bằng ncsa và cho thời gian hết hạn của user theo ý mình :
# Add this to the auth_param section of squid.conf
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
# Add this to the bottom of the ACL section of squid.conf
acl ncsa_users proxy_auth REQUIRED

###acl business_hours time M T W H F 9:00-17:00

# Add this at the top of the http_access section of squid.conf
http_access allow ncsa_users business_hours

---sau đó :

#htpasswd /etc/squid/squid_passwd kimsach
New password:
Re-type new password:
Adding password for user kimsach
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:50 PM.


© Diễn đàn HackingArt (HA) được xây dựng và phát triển bởi các thành viên.
+ Diễn đàn HackingArt là nơi trao đổi của các webmaster chuyên nghiệp.