Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Thảo Luận Chung về ISA và Các Bài Viết Khác (http://quantrinet.com/forum/forumdisplay.php?f=424)
-   -   Triển khai isa firewall cho hệ thống doanh nghiệp phần 2: Access rules (http://quantrinet.com/forum/showthread.php?t=4959)

hoctinhoc 30-06-2010 09:03 AM

Triển khai isa firewall cho hệ thống doanh nghiệp phần 2: Access rules
 
PHẦN 2: ACCESS RULES

I. Giới thiệu:
Tiếp theo phần 1, sau khi các bạn đã cài đặt thành công ISA Server 2006, các bạn cần phải tạo ra các Access Rule để quản lý mọi gói tin ra vào hệ thống. Trong phần 2 sẽ hướng dẫn cách tạo các Access Rule phù hợp với nhu cầu của các doanh nghiệp hiện nay.

Trong bộ bài viết này bao gồm các phần:
Phần I:
Cài đặt ISA Server 2006
Phần II: Cấu hình Access Rule
Phần III: Cấu hình VPN Client-to-Gateway qua đường truyền ADSL


Bài lab bao gồm các bước:
1. Kiểm tra Default Rule

2. Tạo rule truy vấn DNS để phân giải tên miền
3. Tạo rule cho phép các user thuộc nhóm Manager truy cập Internet không hạn chế
4. Tạo rule cho phép các user thuộc nhóm Staff chỉ được phép truy cập 1 số trang web trong giờ hành chánh
5. Tạo rule cho phép các user thuộc nhóm Staff được truy cập web trong giờ giải lao, ngoại trừ trang ngoisao.net
6. Tạo rule cho phép user có thể kết nối mail yahoo bằng Outlook Express
7. Không cho nghe nhạc trực tuyến, cấm chat Yahoo Messenger, cấm download file có đuôi .exe
8. Cấm truy cập một số trang web, nếu truy cập sẽ tự động chuyển đến trang web cảnh cáo của công ty


II. Chuẩn bị :

Mô hình bài lab như phần 1, bài lab bao gồm 2 máy:
- Máy DC: Windows Server 2003 SP2 hoặc Windows Server 2008
+ Tạo OU HCM. Trong OU HCM, tạo 2 group Manager, Staff.
+ Trong OU HCM, tạo 2 user Man1, Man2 làm thành viên của group Manager
+ Trong OU HCM, tạo 2 user Staff1, Staff2 làm thành viên của group Staff
- Máy ISA Server: Windows Server 2003 SP2

III. Thực hiện:
1. Kiểm tra Default Rule

- Mặc định sau khi cài ISA Server 2006, chỉ có 1 access rule tên Default Rule cấm tất cả mọi traffic ra vào


http://msopenlab.com/uploads/image001.jpg
- Tại máy DC, log on MSOpenLab\Administrator, truy cập vào trang web bất kỳ, kiểm tra nhận được thông báo lỗi của ISA Server



http://msopenlab.com/lab/Rule_isa/image002.jpg

- Vào cmd gõ lệnh nslookup, phân giải lần lượt tên 2 trang web sau:
www.google.comwww.tuoitre.com.vn , kiểm tra phân giải thất bại


http://msopenlab.com/lab/Rule_isa/image003.jpg

2. Tạo rule truy vấn DNS để phân giải tên miền

- Tại máy ISA Server, log on MSOpenLab\Administrator, mở ISA Server Management, chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/lab/Rule_isa/image004.jpg

- Hộp thoại Access Rule Names, đặt tên rule là: DNS Query


http://msopenlab.com/lab/Rule_isa/image005.jpg

- Hộp thoại Rule Action, chọn Allow


http://msopenlab.com/lab/Rule_isa/image006.jpg

- Hộp thoại Protocols, chọn Selected Protocols và nhấn Add


http://msopenlab.com/lab/Rule_isa/image007.jpg

- Trong hộp thoại Add Protocols, bung mục Common Protocols, chọn DNS, nhấn Add


http://msopenlab.com/lab/Rule_isa/image008.jpg

- Nhấn Next


http://msopenlab.com/lab/Rule_isa/image009.jpg

- Hộp thoại Access Rule Sources, Add 2 Rule : InternalLocal Host


http://msopenlab.com/lab/Rule_isa/image010.jpg

- Hộp thoại Access Rule Destinaton, Add Rule: External, nhấn Next


http://msopenlab.com/lab/Rule_isa/image011.jpg

- Hộp thoại User Sets, chọn All Users, nhấn Next


http://msopenlab.com/lab/Rule_isa/image012.jpg

- Hộp thoại Completing the New Access Rule Wizard, kiểm tra lại thông tin về Rule lần cuối, sau đó nhấn Finish


http://msopenlab.com/lab/Rule_isa/image013.jpg

- Nhấn chọn Apply, Ok


http://msopenlab.com/uploads/image014.jpg
Lưu ý: Sau mỗi lần tạo rule, phải chọn Apply để rule có hiệu lực

3. Tạo rule cho phép các user thuộc nhóm Manager truy cập Internet không hạn chế

a. Tạo Element để định nghĩa nhóm Manager và Staff
- Trong cửa sổ ISA Server Management, tại cửa sổ thứ 3, chọn tab Toolbox, bung mục Users, chọn New


http://msopenlab.com/lab/Rule_isa/image015.jpg

- Hộp thoại User set name, đặt tên là Manager


http://msopenlab.com/lab/Rule_isa/image016.jpg

- Hộp thoại Users, nhấn Add, chọn Windows users and groups…


http://msopenlab.com/lab/Rule_isa/image017.jpg

- Add 2 users Man1Man2 vào hộp thoại Users


http://msopenlab.com/lab/Rule_isa/image018.jpg

- Trong hộp thoại Completing, chọn Finish


http://msopenlab.com/lab/Rule_isa/image019.jpg

- Nhấn Apply


http://msopenlab.com/lab/Rule_isa/image020.jpg

- Tương tự, bạn tạo thêm nhóm là
Staff

http://msopenlab.com/lab/Rule_isa/image021.jpg


- Hộp thoại Users, Add 2 user Staff1
Staff2, chọn Next

http://msopenlab.com/lab/Rule_isa/image022.jpg


- Hộp thoại Completing the New User Set Wizard, chọn Finish
http://msopenlab.com/lab/Rule_isa/image023.jpg

b Tạo Access Rule:

- Chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/uploads/image024.jpg
- Hộp thoại Access Rule Names, đặt tên rule là: Allow Manager – Full Access


http://msopenlab.com/lab/Rule_isa/image025.jpg

- Hộp thoại Rule Action, chọn Allow


http://msopenlab.com/lab/Rule_isa/image006.jpg

- Hộp thoại Protocols, chọn All outbound traffic


http://msopenlab.com/lab/Rule_isa/image026.jpg

- Hộp thoại Access Rule Sources, add Internal, chọn Next


http://msopenlab.com/lab/Rule_isa/image027.jpg

- Hộp thoại Access Rule Destinaton, add External, chọn Next


http://msopenlab.com/lab/Rule_isa/image011.jpg

- Hộp thoại User Sets, remove group All Users, và add group Manager vào, chọn Next


http://msopenlab.com/lab/Rule_isa/image028.jpg

- Hộp thoại Completing the New Access Rule Wizard, chọn Finish


http://msopenlab.com/lab/Rule_isa/image029.jpg

- Nhấn chọn Apply, chọn OK


http://msopenlab.com/uploads/image030.jpg
- Trên máy DC, log on MSOpenLab\Man1, truy cập trang web:
http://vnexpress.nethttp://www.google.com.vn kiểm tra truy cập thành công

http://msopenlab.com/lab/Rule_isa/image031.jpg


http://msopenlab.com/lab/Rule_isa/image032.jpg

4. Tạo rule cho phép các user thuộc nhóm Staff chỉ được phép truy cập 1 số trang web trong giờ hành chánh

a. Tạo Schedule Element
- Trong cửa sổ ISA Server Management, chọn Firewall Policy, qua cửa sổ thứ 3, tại tab Toolbox, bung mục Schedules, chọn New


http://msopenlab.com/lab/Rule_isa/image033.jpg

- Trong ô Name, nhập tên Work Time. Bên dưới chọn từ (7h - 11h) và từ (1h – 5h)


http://msopenlab.com/lab/Rule_isa/image034.jpg

- Tương tự, tạo thêm 1 schedule là Rest Time, với thời gian là từ 11h – 1h


http://msopenlab.com/lab/Rule_isa/image035.jpg

b. Tạo Element URL Sets

- Trong cửa sổ ISA Server Management, chọn Firewall Policy, qua cửa sổ thứ 3, tại tab Toolbox, bung mục Network Objects, nhấn New, chọn URL Set


http://msopenlab.com/lab/Rule_isa/image036.jpg

- Trong hộp thoại New URL Set. Ô Name , nhập tên:
Restrict Web, add các trang web mà bạn muốn cấm (Vd:http://ngoisao.net ) chọn OK


http://msopenlab.com/lab/Rule_isa/image037.jpg

- Tương tự, bạn tạo thêm URL Set là: Allow Web và add những trang web được phép truy cập vào

http://msopenlab.com/lab/Rule_isa/image038.jpg


c. Tạo Access Rule:

- Chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/lab/Rule_isa/image039.jpg

- Hộp thoại Access Rule Names, đặt tên rule là: Allow Staff on Work Time


http://msopenlab.com/lab/Rule_isa/image040.jpg

- Hộp thoại Rule Action, chọn Allow


http://msopenlab.com/lab/Rule_isa/image006.jpg

- Hộp thoại Protocols, chọn Selected Protocols và nhấn Add


http://msopenlab.com/lab/Rule_isa/image041.jpg

- Trong hộp thoại Add Protocols, bung mục Common Protocols, chọn HTTP và HTTPS, nhấn
Add

http://msopenlab.com/lab/Rule_isa/image042.jpg


- Nhấn
Next

http://msopenlab.com/lab/Rule_isa/image043.jpg


-
Hộp thoại Access Rule Sources, add Internal


http://msopenlab.com/lab/Rule_isa/image027.jpg

- Hộp thoại Access Rule Destinaton, nhấn Add


http://msopenlab.com/lab/Rule_isa/image044.jpg

- Bung URL Sets, chọn Allow Web


http://msopenlab.com/lab/Rule_isa/image045.jpg

- Nhấn Next


http://msopenlab.com/lab/Rule_isa/image046.jpg

- Hộp thoại User Sets, remove group All Users, add group Staff


http://msopenlab.com/lab/Rule_isa/image047.jpg

- Hộp thoại Completing the New Access Rule Wizard, nhấn Finish


http://msopenlab.com/lab/Rule_isa/image048.jpg

- Chuột phải lên Rule Allow Staff on Work Time, chọn Properties

http://msopenlab.com/lab/Rule_isa/image049.jpg


- Qua Tab Schedule, trong khung schedule, chọn là Work Time , Nhấn
OK

http://msopenlab.com/lab/Rule_isa/image050.jpg


- Trên máy DC, log on MSOPenLab\Staff1, truy cập trang web http://vnexpress.nethttp://www.nhatnghe.com, kiểm tra truy cập thành công

http://msopenlab.com/uploads/image031.jpg


http://msopenlab.com/lab/Rule_isa/image052.jpg

- Truy cập những trang web khác, ví dụ:
http://www.google.com, kiểm tra không truy cập được


http://msopenlab.com/lab/Rule_isa/image053.jpg
5. Tạo rule cho phép các user thuộc nhóm Staff được truy cập web trong giờ giải lao, ngoại trừ trang ngoisao.net
- Trong cửa sổ ISA Server Management, chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/lab/Rule_isa/image054.jpg

- Hộp thoại Access Rule Names, đặt tên rule là: Allow Staff on Rest Time


http://msopenlab.com/lab/Rule_isa/image055.jpg

- Hộp thoại Rule Action, chọn Allow

- Hộp thoại Protocols, chọn Selected Protocols và nhấn Add


http://msopenlab.com/lab/Rule_isa/image041.jpg

- Trong hộp thoại Add Protocols, bung mục Common Protocols, chọn HTTP và HTTPS, nhấn
Add

http://msopenlab.com/lab/Rule_isa/image042.jpg


- Nhấn Next

http://msopenlab.com/lab/Rule_isa/image043.jpg


- Hộp thoại Access Rule Sources, add Internal, nhấn Next


http://msopenlab.com/lab/Rule_isa/image027.jpg


- Hộp thoại Access Rule Destinaton, add External, nhấn Next


http://msopenlab.com/lab/Rule_isa/image011.jpg

- Hộp thoại User Sets, remove group All Users, add group Staff vào, chọn Next


http://msopenlab.com/lab/Rule_isa/image047.jpg

- Hộp thoại Completing the New Access Rule Wizard, nhấn
Finish

http://msopenlab.com/lab/Rule_isa/image056.jpg


- Chuột phải lên rule Allow Staff on Rest Time, chọn Properties


http://msopenlab.com/lab/Rule_isa/image057.jpg

- Qua Tab Schedule, trong mục Schedule, chọn Rest Time


http://msopenlab.com/lab/Rule_isa/image058.jpg

- Qua tab To, khung Exceptions, nhấn Add


http://msopenlab.com/lab/Rule_isa/image059.jpg

- Bung mục URL Sets, chọn
Restrict Web

http://msopenlab.com/lab/Rule_isa/image060.jpg


- Nhấn Apply, chọn OK


http://msopenlab.com/lab/Rule_isa/image061.jpg

- Trên máy DC, log on user MSOPenLab\Staff2, truy cập trang: http://ngoisao.net, kiểm tra nhận thông báo lỗi.


http://msopenlab.com/lab/Rule_isa/image062.jpg

- Truy cập những trang web khác (ví dụ: http://www.google.com.vn.) kiểm tra truy cập thành công


http://msopenlab.com/lab/Rule_isa/image063.jpg

6. Tạo rule cho phép user có thể kết nối mail yahoo bằng Outlook Express
- Trong cửa sổ ISA Server Management, chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/lab/Rule_isa/image064.jpg

- Hộp thoại Access Rule Names, đặt tên rule là: Allow Manager – Full Access


http://msopenlab.com/lab/Rule_isa/image065.jpg

- Hộp thoại Rule Action, chọn Allow


http://msopenlab.com/lab/Rule_isa/image006.jpg

- Hộp thoại Protocols, chọn Selected Protocol, nhấn Add


http://msopenlab.com/lab/Rule_isa/image007.jpg

- Trong hộp thoại Add Protocols, bung mục Common Protocols, chọn SMTP và POP3, nhấn Add


http://msopenlab.com/lab/Rule_isa/image066.jpg

- Nhấn Next


http://msopenlab.com/lab/Rule_isa/image067.jpg

- Hộp thoại Access Rule Sources, Aad Internal, nhấn Next


http://msopenlab.com/lab/Rule_isa/image027.jpg

- Hộp thoại Access Rule Destinaton, add External, nhấn Next


http://msopenlab.com/lab/Rule_isa/image011.jpg

- Hộp thoại User Sets, bạn chọn All Users


http://msopenlab.com/lab/Rule_isa/image012.jpg

- Hộp thoại Completing the New Access Rule Wizard, Finish


http://msopenlab.com/lab/Rule_isa/image068.jpg

- Nhấn chọn Apply, nhấn OK


http://msopenlab.com/lab/Rule_isa/image069.jpg

- Log on Man1 trên máy DC, vào Start\Programs, chọn
OutlookExpress
- Trong khung Display Name, bạn gõ tên vào. Ví dụ: msopenlab . Nhấn
Next

http://msopenlab.com/lab/Rule_isa/image070.jpg


- Trong khung email address, điền địa chỉ yahoo của bạn (Ví dụ: msopenlab@yahoo.com.vn) Nhấn
Next

http://msopenlab.com/lab/Rule_isa/image071.jpg


- Trong hộp thoại E-mail Server Names, trong khung My incoming mail server, bạn chọn là POP3

+ Incoming mail: pop.mail.yahoo.com.vn
+ Outgoing mail: smtp.mail.yahoo.com.vn
nhấn Next

http://msopenlab.com/lab/Rule_isa/image072.jpg

- Trong hộp thoại Internet Mail Logon, nhậpaccount passwordvào (không điền @yahoo.com.vn)


http://msopenlab.com/lab/Rule_isa/image073.jpg

- Tiếp theo, vào Tools, chọn Accounts


http://msopenlab.com/lab/Rule_isa/image074.jpg

- Qua tab Mail, nhấn Properties


http://msopenlab.com/lab/Rule_isa/image075.jpg

- Trong hộp thoại Properties, qua tab Advanced.

+ Trong khung Outgoing mail (SMTP): bạn gõ vào 587
+ Trong khung Incoming mail (POP3), bạn gõ vào 995 và đánh dấu check vào ô chọn This server requires a secure connection
+ Trong khung Delivery, đánh dấucheck vào Leave a copy of messages on server
chọn Apply, OK

http://msopenlab.com/lab/Rule_isa/image076.jpg


- Sau đó, nhấn vào biểu tượng Send/Receive, bạn sẽ nhận được mail từ yahoo tải về


http://msopenlab.com/lab/Rule_isa/image077.jpg

7. Không cho nhân viên nghe nhạc trực tuyến, cấm chat Yahoo Messenger, cấm download file có đuôi .exe
a. Cấm trong giờ hành chánh
- Tại máy ISA Server, trong cửa sổ ISA Server Management, c
huột phải lên rule Allow Staff on Work Time, chọn Configure HTTP



http://msopenlab.com/uploads/image081W-U2.jpg

- Qua tab Signatures, nhấn Add


http://msopenlab.com/lab/Rule_isa/image082.jpg

- Ở khung Name, nhập tên:
Deny Yahoo Messenger
Khung Search in, chọn tùy chọn
: Request headers
Khung HTTP Header, nhập:
Host:
Khung Signature, nhập: msg.yahoo.com
chọn OK


http://msopenlab.com/lab/Rule_isa/image083.jpg

- Nhấn Apply, chọn OK


http://msopenlab.com/lab/Rule_isa/image084.jpg

- Qua tab Methods, trong khung Specify the action taken for HTTP methods, chọn Block specified methods (allow all others)


http://msopenlab.com/lab/Rule_isa/image085.jpg

- Nhập vào những định dạng file mà bạn muốn cấm, ví dụ: .exe


http://msopenlab.com/lab/Rule_isa/image086.jpg

- Chuột phải vào Allow Staff on Work Time, chọn Properties

http://msopenlab.com/uploads/image087.jpg


- Qua tab Content Types, khung This rule applies to, chọn Selected content types

- Trong khung Content Types bỏ dấu chọn ô Audio Video (để user không nghe nhạc trực tuyến). Nhấn Apply, chọn OK


http://msopenlab.com/lab/Rule_isa/image088.jpg

b. Cấm trong giờ giải lao: Làm tương tự bước a trên rule Allow Staff on Rest Time

c. Kiểm tra:
- Log on Administrator trên máy Client, thử Sign in vào Yahoo Messenger, bạn sẽ không thể đăng nhập Yahoo được


http://msopenlab.com/lab/Rule_isa/image089.jpg

- Thử truy cập vào trang http://nhacso.net, kiểm tra không được nghe nhạc trực tuyến

http://msopenlab.com/lab/Rule_isa/image090.jpg


- Bạn thử download 1 file.exe bất kỳ từ trang web nào đó. (VD:
http://bkav.com.vn)


http://msopenlab.com/lab/Rule_isa/image091.jpg

- Kiểm tra sẽ thấy download thất bại

http://msopenlab.com/lab/Rule_isa/image092.jpg


8. Cấm truy cập một số trang web, nếu truy cập sẽ tự động chuyển đến trang web cảnh báo của công ty
a. Tạo Access Rule cho truy cập từ Internal tới Internal với All Protocol (tương tự như các bước trên)

http://msopenlab.com/uploads/internal.jpg

b. Tạo URL Sets : (xem lại phần 4b)


- Add những trang web mà bạn muốn cấm vào Deny Web


http://msopenlab.com/lab/Rule_isa/image093.jpg

c. Tạo Access Rule

- Chuột phải Firewall Policy, chọn New, chọn Access Rule


http://msopenlab.com/lab/Rule_isa/image094.jpg

- Hộp thoại Access Rule Names, đặt tên rule là: Deny and Redirect Web


http://msopenlab.com/lab/Rule_isa/image095.jpg

- Hộp thoại Rule Action, chọn Deny


http://msopenlab.com/lab/Rule_isa/image096.jpg

- Trong hộp thoại Protocols, chọn Selected protocols, nhấn Add


http://msopenlab.com/lab/Rule_isa/image007.jpg

- Trong hộp thoại Add Protocols, bung mục Common Protocols, chọn HTTP và HTTPS, nhấn Add


http://msopenlab.com/lab/Rule_isa/image043.jpg

- Hộp thoại Access Rule Sources, Add Rule: Internal, nhấn Next


http://msopenlab.com/lab/Rule_isa/image097.jpg

- Hộp thoại Access Rule Destinaton, nhấn Add.

http://msopenlab.com/lab/Rule_isa/image044.jpg

- Bung mục URL Sets, add Deny Web


http://msopenlab.com/lab/Rule_isa/image098.jpg

- Nhấn Next


http://msopenlab.com/lab/Rule_isa/image099.jpg

- Hộp thoại User Sets, chọn All Users


http://msopenlab.com/lab/Rule_isa/image012.jpg

- Hộp thoại Completing the New Access Rule Wizard, nhấn Finish


http://msopenlab.com/lab/Rule_isa/image100.jpg

- Move up rule Deny and Redirect Web làm rule số 2, chọn Apply, nhấn OK


http://msopenlab.com/uploads/image101.jpg

- Chuột phải vào rule Deny and Redirect Web, chọn Properties


http://msopenlab.com/uploads/image102.jpg

-
Trong hộp thoại Deny and Redirect Web Properties, qua tab Action, đánh dấu check vào mục Redirect HTTP requests to this Web Page, khung bên dưới nhập vào trang web mà bạn muốn redirect về http://www.msopenlab.com/canhcao.htm(Trong bài viết có hosting sẳn trang web này tại máy DC, tham khảo bài viết INTERNET INFORMATION SERVICES (IIS) 7.0)


http://msopenlab.com/lab/Rule_isa/image103.jpg

- Log on user MSOPenLab\Man2 trên máy DC, truy cập vào trang web bị cấm. VD: http://www.muctim.com.vn sẽ tự động redirect về trang cảnh báo của công ty


http://msopenlab.com/lab/Rule_isa/image104.jpg


Theo: Msopenlab


:battay:


Bây giờ là 09:52 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.