8/13/2012

TS Gateway và ISA Server


I. Giới thiệu
Tiếp tục chủ đề TS Gateway, trong bài viết này ta sẽ dùng ISA Server (v. 2004 hoặc 2006) với TS Gateway để nâng cao mức bảo mật cho TS Gateway server bằng cách cấu hình ISA Server làm một thiết bị cầu nối SSL (SSL bridging device). Khi SSL bridging được sử dụng, ISA Server có thể kết thúc các phiên làm việc SSL, kiểm tra các gói tin, và  thiết lập lại phiên làm việc SSL. ISA Server nâng cao mức bảo mật bằng cách giải mã các gói SSL đi vào, kiểm tra mã độc hại, và sau đó khóa kết nối chứa các gói tin độc hại (hoặc nghi ngờ độc hại). ISA Server cũng thực hiện lọc HTTP giúp kiểm tra nội dung ứng dụng HTTP.
Ba kịch bản kết hợp ISA Server và TS Gateway server để nâng cao mức bảo mật các kết nối từ xa tới mạng nội bộ:
·         ISA Server làm SSL bridging device (Web proxy). ISA Server cung cấp SSL bridging giữa Terminal Services client và TS Gateway server.
·         ISA Server làm firewall và SSL bridging device. ISA Server làm firewall thực hiện lọc port, lọc gói tin, và SSL bridging.
·         ISA Server làm firewall thực hiện lọc port (server publishing). ISA Server làm firewall ngoài lọc gói tin và chỉ cho phép dữ liệu qua port 443.
Trong bài lab này ta sẽ dùng ISA Server như một Web proxy (kịch bản thứ nhất). Bài lab gồm các bước sau:
1.     Xuất certificate của TS Gateway server và copy vào ISA Server
2.     Nhập certificate của TS Gateway server lên ISA Server
3.     Chép và cài đặt root certificate lên ISA Server
4.     Tạo Web publishing rule trên ISA Server
5.     Tắt/bật HTTPs/HTTP bridging trên TS Gateway server
6.     Cấu hình client và kiểm tra kết nối
II. Chuẩn bị
Mô hình gồm 4 máy:
- Máy DC (W2K3 hoặc W2K8)
- Máy TS Gateway server (W2K8)
- Máy ISA Server 2006 (W2K3)
- Máy Terminal Services client (Vista SP1 hoặc W2K8)

+----+  172.16.1.0/24
| DC |------------------
+----+ 1.42            | 1.41 +---------+  192.168.1.0/24  +--------+
                       |------|   ISA   |------------------| Client |
+----+                 |      +---------+ 1.41        1.49 +--------+
| TS |------------------
+----+ 1.43

Nhắc lại các ý chính cần thực hiện trước khi kết hợp TS Gateway với ISA Server:
(i) Trên máy DC (pc42.nhatnghe42.local)
- Tạo user account u1 (password=123)
- Tạo group TS Gateway
- Add user u1 vào group Remote Desktop Users và TS Gateway
- Enable Remote Desktop
- Chỉnh Default Domain Controllers Policy -> User Rights Assignment: Add group Remote Desktop Users vào policy Allow log on through Terminal Services
- tạo alias ts1 chỉ tới máy TS Gateway server (pc43.nhatnghe42.local)

 (ii) Trên máy TS Gateway server (pc43.nhatnghe42.local)
- Install Stand-alone root CA
- Request và install Server Authentication certificate cho máy TS Gateway server (nhớ export certificate sang Local Computer store). Certificate tên ts1.nhatnghe42.local.
- Install TS Gateway role service
III. Thực hiện
1.    Xuất certificate của TS Gateway server và copy vào ISA Server (thực hiện trên máy TS Gateway server)
B1: Right click certificate ts1.nhatnghe42.local -> All Tasks -> Export -> Next

B2: Chọn Yes, export the private key -> Next

B3: Chọn Include all certificates in the certificate path if possible -> Next

B4: Nhập password và confirm password -> Next

B5: Nhập tên file (vd C:\ts1.pfx) -> Next

B6: Chọn Finish -> OK

B7: Chép file certificate của TS Gateway server (C:\ts1.pfx) sang máy ISA Server (máy pc41.nhatnghe42.local)

2.    Nhập certificate của TS Gateway server lên ISA Server (thực hiện trên máy ISA Server)
B1: Mở Certificates snap-in console -> Certificates (Local Computer) -> Right click Personal -> All Tasks -> Import -> Next

B2: Nhập tên file chứa certificate của TS Gateway server vừa mới chép sang -> Next

B3: Nhập password -> chọn Mark this key as exportable -> Next

B4: Chọn Automatically select the certificate store based on the type of certificate -> Next

B5: Click Finish -> OK


3.    Chép và cài đặt root certificate lên ISA Server (thực hiện trên máy ISA Server)
Không cần thiết nếu khi import certificate ở bước trước ta đã chọn “Automatically select the certificate store based on the type of certificate”.

4.    Tạo Web publishing rule trên ISA Server (thực hiện trên máy ISA Server)
B1: Right click Firewall Policy -> New -> Web Site Publishing Rule

B2: Nhập tên rule (vd: Publish TS Gateway server) -> Next

B3: Chọn Allow -> Next

B4: Chọn Publish a single Web site or load balancer -> Next

B5: Chọn Use SSL to connect to the published Web server or server farm -> Next

B6: Mục Internal site name nhập tên của TS Gateway server (vd: ts1.nhatnghe42.local) -> Next

B7: Click Next

B8: Mục Public name nhâp tên của TS Gateway server (vd: ts1.nhatnghe42.local) -> Next

B9: Click New

B10: Mục Web listener name nhập tên của Web listener (vd WL443)

B11: Chọn Require SSL secured connections with clients -> Next

B12: Click External -> Next

B13: Click Select Certificate -> Chọn certificate -> Select -> Next

B14: Chọn No Authentication -> Next -> Next -> Finish

B15: Xác nhận web listener đã được chọn -> Next

B16: Chọn No delegation, and client cannot authenticate directly -> Next

B17: Click Next -> Finish -> Apply -> OK

B18: Kiểm tra rule đã được tạo

5.    Tắt/bật HTTPs/HTTP bridging trên TS Gateway server (thực hiện trên máy TS Gateway server)

6.    Cấu hình client và kiểm tra kết nối (thực hiện trên máy client)
B1: Chỉnh host file

B2: Chạy Remote Desktop Connection -> Kết nối thành công

0 nhận xét:

Post a Comment