lecture tmg
DESCRIPTION
Lecture TMG. วิทยากร : สุวิทย์ สายพันธ์ Instructor:Suwit Saiphan. TMG Firewall Internal network (192.168.0.x) External network (202.44.33.x). 11. WEB. 3. AD / Web. FTP. 192.168.0.253. 12. 2. NPS Radius. 4. DNS. 1. DNS. 192.168.0.250. TMG. 5. 9. C1 ( SecureNAT ). 7. - PowerPoint PPT PresentationTRANSCRIPT
Lecture TMG
วทิยากร: สวุทิย ์สายพนัธ์Instructor: Suwit Saiphan
TMG FirewallInternal network (192.168.0.x)External network (202.44.33.x)
TMG
AD / Web
DNS
C1 (SecureNAT)
C2 (WebProxy)
1
3
4
5
6
7
8
DNS2
C1 Access Rule
C2 Access Rule
9
10
11
12
WEB
FTP
192.168.0.250
192.168.0.253
NPSRadius
Prepare Network• เครื่อง TMG
– Windows Server 2008 R2 Enterprise Edition1. Set IP Address ของ Network Card ทัง้สอง
• External IP: 202.44.33.x• GW: ไมต้่องใส่• DNS: 202.44.33.200
2. Internal: 192.168.0.x• GW: ไมต้่องใส่• DNS: ไมต้่องใส่
3. ทดสอบการ PingC:\> ping <IP ของ WEB External>C:\> ping <IP ของ AD Internal>C:\> ping <IP ของ Client Internal>
Prepare Network
• เครื่อง AD (Notebook)– Windows Server 2008 R2 Enterprise Edition
1. Set IP Address ของ Network Card• IP: 192.168.0.x • GW: IP ของ TMG (Internal)• DNS: ไมต้่องใส่
2. ทดสอบการ PingC:\> ping <IP ของ TMG Internal>
Prepare Network
• เครื่อง Client (Notebook)– Windows XP / 7
1. Set IP Address ของ Network Card• IP: 192.168.0.x • GW: IP ของ TMG (Internal)• DNS: ไมต้่องใส่
2. ทดสอบการ PingC:\> ping <IP ของ TMG Internal>C:\> ping <IP ของ AD Internal>
ผลการ Ping
• แสดงวา่ เครื่องปลายทางมอียูจ่รงิ Network• ใชง้านได้• แต่เครื่องนี้ทำาการบล็อกการ Ping ไว้
ผลการ Ping
• แสดงวา่ เครื่องปลายทางมอียูจ่รงิ Network• ใชง้านได้เป็นปกติ
ผลการ Ping
• แสดงวา่ เครื่องปลายทางไมม่ี• แสดงวา่ เครื่องปลายทางม ีแต่ไมเ่ปิดเครื่อง• แสดงวา่ เครื่องปลายทางม ีแต่สาย Network ไม่
ได้เชื่อมต่อ
Prepare ชื่อเครื่อง• เครื่อง TMG
– Rename ชื่อเครื่องเป็น TMGxxx – (Restart เครื่อง )– เชค็การเชื่อมต่ออินเตอรเ์น็ตของ Interface ท่ีเป็น
202.44.33.0
ติดตัง้ TMG
• เครื่อง TMG– ใสแ่ผ่นติดตัง้ TMG– Run Preparation Tool– Run Installation Wizard– Configuration Wizard– Enable Remote Desktop ในตัว TMG
อธบิายสว่นประกอบต่างๆใน TMG Management
• Dashboard• Monitoring• Firewall Policies• Networking• System• Log & Report• Trouble Shooting
สรา้งบญัชรีายชื่อบนเครื่อง TMG
• User01 / password• User02 / password• User03 / password
SecureNAT Client
• Run บน OS อะไรก็ได้ (Windows / Linux / Mac)• ต้องกำาหนดค่า Default Gateway มาที่ IP ของ
TMGWebProxy Client
• Run OS อะไรก็ได้ (Windows / Linux / Mac)• ไมจ่ำาเป็นต้องกำาหนดค่า Gateway มาที่ IP ของ
TMG• ต้องกำาหนดค่า Proxy Setting ใน Browser
192.168.0.x / 8080
TMG Client• Run บน Windows เท่านัน้• ไมจ่ำาเป็นต้องกำาหนดค่า Gateway มาท่ี IP ของ
TMG• จะมกีาร Configure Web Browser ใหอั้ตโนมติั• จะมกีาร Authentication User
สรา้ง Firewall Policies
1. Allow Internal External ใช ้Protocol HTTP All Users
2. Allow Internal External ใช ้Protocol HTTP กำาหนด User Set / Exceptions
3. Allow Internal External ใช ้Protocol FTP All Users
4. Allow Internal DNS Server ใช ้Protocol DNS All Users
เตรยีมเครื่อง AD / DNS / WebServer
• เครื่อง AD– Windows Server 2008 R2– Promote AD (DemoXX.com)– ตรวจเชค็เรื่อง Network Setting– IP: 192.168.0.X– GW: 192.168.0.X (IP ของ TMG)– DNS: 192.168.0.X (IP – ของตัวเอง 127.0.0.1)– Forwarder: 202.44.33.200
AD
DNS
TMG
192.168.1.100
การคอนฟกิให ้Authen ผ่าน NPS1. Configure ท่ีเครื่อง AppServer(NPS/AD)
- Add Role AD (Active Directory Service)- DCPromo.exe- Add Users / Group- Add Role Network Policies Service- เปิดไปท่ี Network Policies Service- กำาหนด RADIUS Client (IP ของ TMG)- กำาหนด Network Policies (User Group)- กำาหนด การ Authentication (Unencrypted)- กำาหนด Shared secret key/password
การคอนฟกิให ้Authen ผ่าน NPS2. Configure ท่ีเครื่อง TMG (RADIUS Client)
- Networking Networks- เลือกท่ี Internal Double Click เปิดการคอนฟกิ- เลือกท่ี Web Proxy Authentication- เลือก Method (RADIUS)- เลือก Select Domain (ใส ่domain name) xxxx.com / xxxx.go.th- เลือก RADIUS Server (IP ของ AppServer/NPS)- กำาหนด Shared secret key/password ใหต้รงกับท่ี NPS
การคอนฟกิให ้Authen ผ่าน NPS2. Configure ท่ีเครื่อง TMG (Access Rule)
- Firewall Policies- New Access Rule (Copy ก็ได้)- กำาหนด User namespace ชีไ้ปท่ี RADIUS (NPS) โดยเลือกใหเ้ป็น All user in namespace
3. ทดสอบการ Authen ผ่าน RADIUS Server- เครื่อง Client Web browser ชีค่้า Proxy Server ไปท่ี TMG (Port 8080)- Popup ใหใ้ส ่User/Password [email protected] password
การคอนฟกิ DNS ภายใน• เครื่อง AppServ(DNS Role)
– กำาหนดให ้DNS Forward Queries ไปยงั External DNS– กำาหนด IP address ของ External DNS– กำาหนด Gateway ชีไ้ปที่ IP ของ TMG (Internal)– กำาหนด DNS ไปท่ี 127.0.0.1
• เครื่อง Client– กำาหนดใหช้ี ้DNS ไปท่ี Internal DNS (AppServ/DNS)– กำาหนด Gateway ชีไ้ปที่ IP ของ TMG (Internal)
• เครื่อง TMG– สรา้ง Access Rule ท่ี Allow Protocol (DNS/DNS Server)– จาก Internal DNS(192.168.0.x) External DNS– Condition (All Users)
การทำา Web Publishing1 . เครื่อง AppServer (WebSever)
- Network setting (Internal IP/GW/DNS)- Add Role (WebServer-IIS)- Add Role Services (ตามใจชอบ)- Configure IIS (ทำา Web page)File default.htm<HTML> <Title>This is my web site</Title>
<Body>Hello, this is my web site</Body></HTML>- ทำาการทดสอบใช ้WebBrowser ท่ีเครื่อง Webserver / TMG http://<ip ของ webserver internal>
การทำา Web Publishing2. เครื่อง TMG (FirewallWeb Publishing)
- Network setting (Internal IP/GW/DNS)- สรา้ง Access Rules Web Publishing- No authentication
3. เครื่อง Client (202.44.33.x)IP: 202.44.33.x (x ตัวเลขเดิม)Mask: 255.255.255.0GW: 202.44.33.x (IP ของ TMG External)DNS: 202.44.33.200- Edit C:\windows\system32\drivers\etc\hosts202.44.33.xxx www.demoXXX.com- Web browser ใหเ้อาค่า Proxy Setting ออก- หากใช ้Client remote ไป TMG ใหเ้พิม่ system policy อนุญาตให ้Client สามารถ RD- โดยใสเ่ป็น IP External ของเครื่อง Client
การบล็อก URL และ Domain
• เครื่อง TMG– บล็อก URL
สรา้ง URL Sethttp://www.bad.com/*
– บล็อก Domainสรา้ง Domain Name Set*.bad.com
กำาหนดค่า URL Set / Domain Set ไวท่ี้ Exception (To)
การกำาหนด Content Type (HTTP)
• ท่ีตำาแหน่งของ Access Rule HTTP• เลือกไปที่ Tab-Content Type
– All Content Type– Select Specified type
• Application• Image• Audio…
• ต้องการเลือกใหเ้ชค็ถกูหน้ารายการที่ต้องการ
การกำาหนด Logging และ Reporting
• Logging– เก็บไวท่ี้ Database (Local DB/External DB)– เก็บไวท่ี้ File (C:\Program File\TMG\Logs)– Filtering เพื่อกรองขอ้มูลในการด ูLog
• Reporting– เป็นการดึงขอ้มูลจาก Logging ใน DB มาทำาการสรา้งเป็น
Report ในรูปแบบของ HTML– Create One-Time Report– Create Recurring Report Job
Export / Import Policies
• Export Policies เพื่อ backup policies• Import Policies เพื่อ restore policies
เครื่อง Windows 7
• Network: 10.10.1.x• GW: 10.10.1.x (IP ของ TMG)• DNS: เลือกอันใดอันหนึ่ง
1. 10.10.1.x (DNS InternalForwarder)2. 192.168.1.100
1. DNS Internal –> Enable Forwarder: 192.168.1.1002. สรา้ง Access Rule ท่ีอนุญาตให้ DNS ออกไปยงั
ExternalDNS3. c:\nslookup www.google.com
InDNS FW ExDNS
เครื่อง Windows 7 - SecureNAT
Clientxxx(Win7)
TMGxxx
Client IP Setting - SecureNAT10.10.1.x (41-71)255.0.0.0GW: 10.10.1.x (IP ของ TMG Internal)DNS: 10.10.1.x (IP ของ TMG Internal, DNS role, Forworder (192.168.1.100)
10.10.1.x (11-40)
192.168.1.x (11-40)
192.168.1.100
HTTP
ใหล้บ Proxy Setting ออก ใน Browser ท่ีใชง้าน
เครื่อง Windows 7 - WebProxyClient
Clientxxx(Win7)
TMGxxx
Client IP Setting – WebProxyClient10.10.1.x (41-71)255.0.0.0GW: 10.10.1.x (IP ของ TMG Internal)
10.10.1.x (11-40)
192.168.1.x (11-40)
192.168.1.100
HTTP
Browser Setting (IE-Internet Option)Proxy Server – IP ของ TMG (10.10.1.x)
– Port 8080Browse InternetPopup – Username/Password
ให้ C1,C2 ออกไปใชง้าน HTTP,FTP ได้ผ่าน TMG Firewall โดย Internal network (192.168.0.x)
External network (202.44.33.x)
TMG
AD / Web
DNS
C1 (SecureNAT)
C2 (WebProxy)
1
3
4
5
67
8
DNS
2
C1 Access Rule
C2 Access Rule
9
10
11
12
Final Workshop1 . ต้องการอนุญาตผ่าน Firewall ไปใชง้าน Web site ขา้งนอกโดย
มเีง่ือนไขต่อไปนี้1.1 อนุญาตเฉพาะกลุ่มผู้ใชท่ี้ชื่อ Students ใน Active Directory1.2 โดยมรีายชื่อผู้ใชคื้อ s_somchai, s_somying1.3 ไมอ่นุญาตกลุ่มผู้ใชท่ี้ชื่อ Exceptions ใน AD1.4 โดยมรีายชื่อผู้ใชคื้อ s_somwang, s_sombat1.5 กำาหนดชว่งเวลาท่ีใชง้านใน TMG เฉพาะเวลา 0800-1700 น.1.6 ไมอ่นุญาตเขา้ใช ้URL (www.adaults.com)1.7 ไมอ่นุญาตใชง้านใน Domain (expections.com) ทกุ servers1.8 ใหใ้ช ้DNS ภายในเท่านัน้ ท่ีออกไปใชง้านผ่าน Firewall
1.1 สรา้ง Group Student บน AD
1.2 สรา้ง Users ใน Group Students
1.3 สรา้ง Group Exceptions ใน AD
1.4 สรา้ง Users ใน Group Exceptions
1. สรา้ง Access Rule ที่ Firewall
1. สรา้ง Access Rule ที่ Firewall
1. กำาหนด User Group ใน RADIUS
1. กำาหนด Authentication Method
1. กำาหนด Encryption Method
1.5 กำาหนดชว่งเวลาใชง้าน
1.6 Block URL
1.7 Block Domain
1.8 Allow เฉพาะ DNS (Internal) สามารถไปยงั DNS (External)
1.8 Allow เฉพาะ DNS (Internal) สามารถไปยงั DNS (External)
1.8 Allow เฉพาะ DNS (Internal) สามารถไปยงั DNS (External)
1.8 Allow เฉพาะ DNS (Internal) สามารถไปยงั DNS (External)
ทดสอบที่เครื่อง Client
• กำาหนดค่า Web Browser Proxy Server• ใหช้ี ้TMG (Firewall)• http://www.hello.com สามารถเขา้ได้• http://www.adaults.com ไมส่ามารถเขา้ได้• http://www.exceptions.com ไมส่ามารถเขา้ได้• User: s_somchai, s_somying สามารถใชไ้ด้• User: s_somwany, s_sombat ไมส่ามารถใชไ้ด้• 0800-1700 จะสามารถใชง้านได้