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)
-   Module 7: Configuring Terminal Services (http://quantrinet.com/forum/forumdisplay.php?f=269)
-   -   TS Gateway Server (Windows Server 2008 Terminal Services Gateway Server) (http://quantrinet.com/forum/showthread.php?t=2916)

hoctinhoc 26-06-2009 08:41 PM

TS Gateway Server (Windows Server 2008 Terminal Services Gateway Server)
 
TS Gateway Server
(Windows Server 2008 Terminal Services Gateway Server)

I. Giới thiệu
TS Gateway là một role service của Windows Server 2008 cho phép remote user dùng Remote Desktop Connection (RDC) kết nối với tài nguyên trong mạng LAN thông qua mạng Internet mà không cần đến VPN. TS Gateway đóng gói dữ liệu Remote Desktop Protocol (RDP) qua kênh SSL của giao thức HTTPs. Vì TS Gateway truyền dữ liệu RDP đến port 443 nên có thể vượt qua firewall chặn port 3389 (port được dùng trong kết nối RDP).

Bài lab gồm các bước sau:
1. Cài đặt Stand-alone root CA
2. Xin Server Authentication certificate cho máy TS Gateway server
3. Cài đặt TS Gateway role service
4. Cấu hình Terminal Services client

II. Chuẩn bị
Mô hình gồm máy:
- Máy DC (W2K8)
- Máy TS Gateway server (W2K8)
- Máy Terminal Services client (W2K8 hoặc Vista SP1)

+----+ 172.16.1.0/24 +------------+ 192.168.1.0/24 +--------+
| DC |------------------| TS Gateway |------------------| Client |
+----+ 1.32 1.31 +------------+ 1.31 1.39 +--------+

Địa chỉ IP:

LAN
Cross
DC (PC32)

disabled
IP/SM: 172.16.1.32
DG: 172.16.1.31
DNS: 172.16.1.32
TS Gateway Server (PC31)
IP/SM: 192.168.1.31
DG: 192.168.1.200
DNS: trống
IP/SM: 172.16.1.31
DG: trống
DNS: 172.16.1.32
Client (PC39)
IP/SM: 192.168.1.39
DG: 192.168.1.200
DNS: 203.162.4.191

disabled

Máy DC (pc32.nhatnghe32.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

Máy TS Gateway server join domain (pc31.nhatnghe32.local).

III. Thực hiện
1. Cài đặt Stand-alone root CA (thực hiện trên máy TS Gateway server)
B1: Mở Server Manager -> Add Roles
B2: Chọn Next -> Chọn Active Directory Certificate Services -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image002.jpg
B3: Chọn Certification Authority Web Enrollment -> Chọn Add Required Role Services -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image004.jpg
B4: Chọn Standalone -> Next -> chọn Root CA -> Next -> Next -> Next -> Next -> Next -> Next -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image006.jpg
B5: Chọn Install -> Close
http://tuan.nhatnghe.vn/TS%20Gateway...s/image008.jpg
2. Xin Server Authentication certificate cho máy TS Gateway server (thực hiện trên máy TS Gateway server)
Chỉnh Internet Options
B1: Mở IE -> Chọn Tools -> Chọn Internet Options -> Chọn tab Security -> Chọn Local intranet -> kéo thanh trượt xuống mức Low -> OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image010.jpg

Request Server Authentication certificate cho máy VPN server
B2: Trên thanh địa chỉ nhập http://localhost/certsrv -> Chọn Request a certificate
http://tuan.nhatnghe.vn/TS%20Gateway...s/image012.jpg

B3: Chọn advanced certificate request
http://tuan.nhatnghe.vn/TS%20Gateway...s/image014.jpg

B4: Chọn Create and submit a request to this CA -> chọn Yes
http://tuan.nhatnghe.vn/TS%20Gateway...s/image016.jpg

B5: Điền các thông tin sau:
Name: pc31.nhatnghe32.local
Type of Certificate Needed: chọn Server Authentication Certificate
Chọn Mark keys as exportable
Chọn Submit -> Yes
http://tuan.nhatnghe.vn/TS%20Gateway...s/image018.jpg

B6: Chọn Home để về lại trang http://localhost/certsrv
http://tuan.nhatnghe.vn/TS%20Gateway...s/image020.jpg

Issue certificate cho VPN server
B7: Chọn Start -> Programs -> Admin Tools -> Certification Authority -> Pending Requests -> Right click lên certificate vừa request -> Chọn Issue
http://tuan.nhatnghe.vn/TS%20Gateway...s/image022.jpg

Install certificate
B8: Quay lại IE. Chọn View the status of a pending certificate request
http://tuan.nhatnghe.vn/TS%20Gateway...s/image024.jpg

B9: Chọn Server Authentication Certificate -> Chọn Yes
http://tuan.nhatnghe.vn/TS%20Gateway...s/image026.jpg

B10: Chọn Install this certificate -> Chọn Yes
http://tuan.nhatnghe.vn/TS%20Gateway...s/image028.jpg

Export certificate sang Local Computer store
B11: Chọn Start -> Run -> mmc -> OK
Chọn File -> Add/Remove Snap-in…
Chọn Certificates -> Chọn Add
http://tuan.nhatnghe.vn/TS%20Gateway...s/image030.jpg

B12: Chọn My user account -> Finish
http://tuan.nhatnghe.vn/TS%20Gateway...s/image032.jpg

B13: Chọn Add
http://tuan.nhatnghe.vn/TS%20Gateway...s/image034.jpg

B14: Chọn Computer account -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image036.jpg

B15: Chọn Local computer -> Finish
http://tuan.nhatnghe.vn/TS%20Gateway...s/image038.jpg

B15: Chọn OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image040.jpg

B16: Chọn Certificates – Current User -> Personal -> Certificates -> Right click certificate -> All Tasks -> Export -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image042.jpg

B17: Chọn Yes, export the private key -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image044.jpg

B18: Nhập password và confirm password -> Next -> Browse
http://tuan.nhatnghe.vn/TS%20Gateway...s/image046.jpg

B19: Nhập c:\tsgateway -> Save
http://tuan.nhatnghe.vn/TS%20Gateway...s/image048.jpg

B20: Chọn Next -> Finish -> OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image050.jpg

B21: Certificates (Local Computer) -> Personal -> Right click Certificates -> All Tasks -> Import… -> Next -> Browse
http://tuan.nhatnghe.vn/TS%20Gateway...s/image052.jpg

B22: Chọn file tsgateway.pfx -> Open
http://tuan.nhatnghe.vn/TS%20Gateway...s/image054.jpg

B23: Chọn Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image056.jpg

B24: Nhập password -> Next -> Next -> Finish -> OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image058.jpg

B25: Xóa certificate mọi mục đích (all purpose) (ví dụ trong hình là nhatnghe32-PC31-CA)
http://tuan.nhatnghe.vn/TS%20Gateway...s/image060.jpg

3. Cài đặt TS Gateway role service (thực hiện trên máy TS Gateway server)
B1: Mở Server Manager -> Roles -> Add Roles -> Next -> Chọn Terminal Services -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image062.jpg
B2: Chọn TS Gateway -> Add Required Role Services -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image064.jpg
B3: Chọn certificate pc31.nhatnghe32.local -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image066.jpg
B4: Chọn Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image068.jpg
B5: Add group NHATNGHE32\TS Gateway -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image070.jpg
B6: Chọn Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image072.jpg
B7: Chọn Allow users to connect to any computer on the network -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image074.jpg
B8: Chọn Next -> Next -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image076.jpg
B9: Chọn Install
http://tuan.nhatnghe.vn/TS%20Gateway...s/image078.jpg
B10: Chọn Close
http://tuan.nhatnghe.vn/TS%20Gateway...s/image080.jpg

4. Cấu hình Terminal Services client (thực hiện trên máy Terminal Services client)
Chỉnh hosts file
B1: Mở Windows Explorer. Mở file hosts (trong C:\Windows\System32\drivers\etc)
Thêm một dòng với nội dung: Địa-chỉ-IP-card-LAN-máy-VPN-server tên-máy-VPN-server
http://tuan.nhatnghe.vn/TS%20Gateway...s/image082.jpg

Download CA certificate về máy client
B2: Mở IE. Đưa địa chỉ http://pc31.nhatnghe32.local vào Trusted sites
B3: Trên thanh địa chỉ nhập http://pc31.nhatnghe32.local/certsrv -> Chọn Turn on automatic Phishing Filter -> OK
B4: Chọn Download a CA certificate, certificate chain, or CRL
http://tuan.nhatnghe.vn/TS%20Gateway...s/image084.jpg

B5: Chọn Download CA certificate
http://tuan.nhatnghe.vn/TS%20Gateway...s/image086.jpg
B6: Chọn Open
http://tuan.nhatnghe.vn/TS%20Gateway...s/image088.jpg
B7: Chọn Install Certificate… -> Next
http://tuan.nhatnghe.vn/TS%20Gateway...s/image090.jpg
B8: Chọn Next -> Finish -> OK -> OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image092.jpg

Copy CA certificate vào Local Computer, Trusted Root Certification Authority store
B9: Chọn Start -> Run -> mmc
Đưa Certificates – Current User và Certificates (Local Computer) vào console
http://tuan.nhatnghe.vn/TS%20Gateway...s/image094.jpg
B10: Chọn Certificates – Current User -> Intermediate Certification Authorities -> Certificates
Right click CA certificate -> Copy
http://tuan.nhatnghe.vn/TS%20Gateway...s/image096.jpg
B11: Chọn Certificates (Local Computer) -> Trusted Root Certification Authorities
Right Click Certificates -> Paste
http://tuan.nhatnghe.vn/TS%20Gateway...s/image098.jpg
B12: Xán nhận CA certificate đã được đưa vào Local Computer store
http://tuan.nhatnghe.vn/TS%20Gateway...s/image100.jpg
B13: Start -> Programs -> Accessories -> Remote Desktop Connection -> Options
http://tuan.nhatnghe.vn/TS%20Gateway...s/image102.jpg
B14: Chọn tab Advanced -> Settings
http://tuan.nhatnghe.vn/TS%20Gateway...s/image104.jpg
B15: Chọn Use these TS Gateway server settings -> Mục Server name: nhập pc31.nhatnghe32.local -> OK
http://tuan.nhatnghe.vn/TS%20Gateway...s/image106.jpg
B16: Chọn tab General -> nhập địa chỉ IP máy DC (172.16.1.32) -> Connect
http://tuan.nhatnghe.vn/TS%20Gateway...s/image108.jpg
B17: Nhập nhatnghe32\u1 và password -> OK -> Kết nối thành công
http://tuan.nhatnghe.vn/TS%20Gateway...s/image110.jpg



Châu Tuấn


Bây giờ là 12:21 AM. 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.