Tuesday, July 10, 2012

Allow Some Web and Block All Web with Endian Firewall 2.5

คุณผู้อ่าน... ท่านที่เคารพ

ด้วยแนวคิดให้ผู้ใช้บางกลุ่มใช้งานได้บางเว็บเท่านั้น และผู้ใช้บางกลุ่มใช้งานได้ทุกเว็บโดยไ่ม่มีข้อจำกัด สำหรับ EFW อาจจะมีหลายวิธี แต่... สำหรับผม นี่คือวิธีที่ได้ผล และทดสอบแล้ว

Block All WEB

1. สร้าง profile ใน contenfilter เลือก Custom black - and whitelists ใส่ ** (ดอกจันสองตัว) ในช่อง Block the following sites แล้วตั้งชื่อ profile เอาไว้
-- file ที่ถูก update คือ /etc/dansguardian/profiles/x/bannedsitelist_custom
-- เป็นการ block ด้วย profile ใน dansguardian rule

Allow Some WEB

2. สร้าง Access Policy กำหนดค่า

Source Type : Zone -> GREEN
Destination Type : Domain
Insert Domain : ตัวอย่าง (ต้องมี จุด นำหน้าด้วย)

.google.co.th
.google.com
.gmail.com
.gstatic.com
.yahoo.com
.live.com
.hotmail.com
Authention : user based / Group เลือก User หรือ Group
Access policy : Allow access
Filter profile : Default Profile
Policy status : Enable policy rule
Position : First position

-- file ที่ update คือ /etc/squid/acls/dst_rule0.acl และ dst_rule1.acl
-- อนุญาติผ่าน acl dstdomain ด้วย squid

3. สร้าง Access Policy ที่สอง กำหนดค่า

Source Type : Zone -> GREEN
Destination Type : ANY
Authention : user based / Group เลือก User หรือ Group
Access policy : Allow access
Filter profile : Profile ที่มีการกำหนดค่า ตามข้อ 1
Policy status : Enable policy rule
Position : Last

ทดสอบเอา profile ของ dansguardian ขึ้นเป็น First position ปรากฏว่า block หมดเลยกฏข้อที่สองไม่มีโอกาสได้ทำงานเอาเสียเลย

สำหรับผมวิธีนี้ใช้ได้ผล...
ส่วนท่านจะมีความเห็นอย่างไร... ก็จง Opensource เองเถิด...
เอวัง



0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More