บทช่วยสอนนี้มีคำแนะนำทีละขั้นตอนตั้งค่า PPTP VPN Server 2016 เพื่อเข้าถึงทรัพยากรเครือข่ายท้องถิ่นจากทุกที่ หากมี Windows 2016 Server พร้อม Network Card เดียว และต้องการตั้งค่า VPN เพื่อเชื่อมต่อและเข้าถึงไฟล์เซิร์ฟเวอร์/เครือข่ายจากทุกที่ ให้อ่านต่อ…*
* หมายเหตุ: หากต้องการตั้งค่า VPN Server ที่ปลอดภัยกว่า อ่าน: How to Setup L2TP VPN Server 2016 with a Custom Preshared Key for Authentication
วิธีติดตั้ง PPTP VPN Server 2016 (มีเพียง 1 NIC)
ติดตั้งและตั้งค่า Server 2016 ทำหน้าที่ PPTP VPN Access Server ด้วยขั้นตอน:
ขั้นตอนที่ 1: ติดตั้ง Role Routing and Remote Access บน Server 2016
ขั้นตอนที่ 2: เปิดใช้งาน Routing and Remote Access บน Server 2016
ขั้นตอนที่ 3: ตั้งค่า VPN Server (Security, IP Range ฯลฯ)
ขั้นตอนที่ 4: อนุญาต Inbound Traffic ของ Routing and Remote Access ใน Windows Firewall
ขั้นตอนที่ 5: เลือกผู้ใช้ VPN
ขั้นตอนที่ 6: ตั้งค่า VPN Server ให้อนุญาตการเข้าถึงเครือข่าย
ขั้นตอนที่ 7: ตั้งค่า Firewall ของ ISP ให้อนุญาตการเชื่อมต่อ PPTP
ขั้นตอนที่ 8: ตั้งค่าการเชื่อมต่อ PPTP บน Client
.
ขั้นตอนที่ 1: เพิ่ม Role Remote Access (VPN Access) บน Server 2016
ขั้นตอนแรกคือเพิ่ม Role Remote Access ให้ Server 2016 *
* ข้อมูล: ตัวอย่างตั้งค่า VPN บน Windows Server 2016 ชื่อ "Srv1" IP "192.168.1.8"
1. เปิด 'Server Manager' คลิก Add Roles and Features

2. หน้าจอแรก 'Add Roles and Features Wizard' เลือก Role-based or feature-based installation คลิก Next

3. หน้าจอถัดไป เลือก Select server from the server pool คลิก Next

4. เลือก Role Remote Access คลิก Next

5. ที่ 'Features' ใช้ค่าเริ่มต้น คลิก Next

6. ที่ 'Remote Access' Information คลิก Next

7. ที่ 'Remote Services' เลือก Direct Access and VPN (RAS) Role Services คลิก Next

8. คลิก Add Features

9. คลิก Next อีกครั้ง

10. ใช้ค่าเริ่มต้น คลิก Next (สองครั้ง) ที่ 'Web Server Role (IIS)' และ 'Role Services'

11. ที่ 'Confirmation' เลือก Restart the destination server automatically (if required) คลิก Install

12. หน้าจอสุดท้าย ตรวจสอบการติดตั้ง Remote Access Role สำเร็จ Close Wizard

13. จาก Server Manager Tools เมนู คลิก Remote Access Management
14. เลือก Direct Access and VPN ดานซ้าย คลิก Run the Getting Started Wizard

15. คลิก Deploy VPN Only

ขั้นตอนที่ 2: ตั้งค่าและเปิดใช้งาน Routing and Remote Access บน Server 2016
ขั้นตอนถัดไปคือเปิดใช้งานและตั้งค่า VPN Access บน Server 2016:
1. คลิกขวาที่ชื่อ Server เลือก Configure and Enable Routing and Remote Access *
* หมายเหตุ: สามารถเปิด Routing and Remote Access ได้อีกทางคือ:
1. เปิด Server Manager เมนู Tools เลือก Computer Management
2. ขยาย Services and Applications
3. คลิกขวา Routing and Remote Access เลือก Configure and Enable Routing and Remote Access

2. คลิก Next ที่ 'Routing and Remote Access Server Setup Wizard'

3. เลือก Custom configuration คลิก Next

4. เลือก VPN access เท่านั้น คลิก Next

5. คลิก Finish *
* หมายเหตุ: หากได้ข้อผิดพลาด "Remote Access Service unable to enable Routing and Remote Access ports in Windows Firewall…" คลิก OK เพื่อดำเนินต่อ

6. เมื่อถาม Start Service คลิก Start

ขั้นตอนที่ 3: ตั้งค่า VPN Server (Security, IP Range ฯลฯ)
1. ที่ Routing and Remote Access Panel คลิกขวาที่ชื่อ Server เลือก Properties

2a. แท็บ 'Security' เลือก Windows Authentication เป็น Authentication Provider คลิก Authentication Methods

2b. แน่ใจว่า Microsoft encrypted authentication version 2 (MS-CHAP v2) ถูกเลือก คลิก OK

3a. เลือกแท็บ IPv4 เลือก Static address pool คลิก Add

3b. ใส่ IP Address Range สำหรับ VPN Clients คลิก OK สองครั้งปิดหน้าต่าง
เช่น ตัวอย่างใช้ IP Range: 192.168.1.200 – 192.168.1.209

ขั้นตอนที่ 4: อนุญาต Inbound Traffic ของ Routing and Remote Access ใน Windows Firewall
1. ไป Control Panel > All Control Panel Items > Windows Firewall
2. คลิก Advanced settings ดานซ้าย

3. เลือก Inbound Rules ดานซ้าย
4a. ทางขวา คลิกขวา Routing and Remote Access (PPTP-In)

4b. แท็บ 'General' เลือก Enabled, Allow the connection คลิก OK

5a. คลิกขวา Routing and Remote Access (GRE-In)

5b. แท็บ General เลือก Enabled, Allow the connection คลิก OK

6. ปิด Firewall Settings และ รีสตาร์ท Server
ขั้นตอนที่ 5: เลือกผู้ใช้ที่จะมีสิทธิ์ VPN Access
ระบุผู้ใช้ที่ได้สิทธิ์เชื่อมต่อ VPN Server (Dial-IN Permissions):
1. เปิด Server Manager
2. เมนู Tools เลือก Active Directory Users and Computers *
* หมายเหตุ: หาก Server ไม่ได้อยู่ใน Domain ไป Computer Management -> Local Users and Groups

3. เลือก Users คลิกขวาผู้ใช้ที่ต้องการอนุญาต VPN Access
4. เลือกแท็บ Dial-in เลือก Allow access คลิก OK

ขั้นตอนที่ 6: ตั้งค่า Network Policy Server ให้อนุญาตการเข้าถึงเครือข่าย
เพื่อให้ผู้ใช้ VPN เข้าถึงเครือข่ายผ่าน VPN Connection ให้แก้ไข Network Policy Server:

2. ภายใต้ NPS (Local) เลือก Network Policies ดานซ้าย
3a. ดับเบิลคลิก Connections to Microsoft Routing and Remote Access server Policy

3b. แท็บ 'Overview' เลือกตั้งค่าต่อไปนี้ คลิก OK:
-
- Grant access: If the connection request matches this policy.
- Remote Access Server (VPN-Dial up)

4a. เปิด Connections to other access servers Policy เลือกตั้งค่าเดียวกัน คลิก OK
-
- Grant access: If the connection request matches this
policy. - Remote Access Server (VPN-Dial
up)
- Grant access: If the connection request matches this

5. ปิด Network Policy Server Settings

ขั้นตอนที่ 7: ตั้งค่า Firewall ให้อนุญาต PPTP VPN Access (Port Forwarding)
ขั้นตอนถัดไปคืออนุญาต PPTP VPN Connections บน Router/Firewall ของ ISP
1. เปิดเบราว์เซอร์ พิมพ์ IP Router (เช่น "https://192.168.1.1") ล็อกอินเข้า Web Interface
2. ในการตั้งค่า Router ทำ Port Forwarding พอร์ต 1723 ไปที่ IP ของ VPN Server (ดูคู่มือ Router ว่าทำ Port Forward ยังไง) *
- เช่น VPN Server IP "192.168.1.8" ต้อง Forward พอร์ต 1723 ไป "192.168.1.8"

ขั้นตอนที่ 8: ตั้งค่าการเชื่อมต่อ PPTP VPN บน Client *
* หมายเหตุ & ความช่วยเหลือเพิ่มเติม:
1. เพื่อเชื่อมต่อ VPN Server จากระยะไกล ต้องรู้ Public IP ของ VPN Server หาได้ที่ https://www.whatismyip.com/ (จาก VPN Server 2016)
2. ควรมี Static Public IP Address หากไม่ต้องการจ่ายเงิน Static IP ให้ตั้งค่า Dynamic DNS ฟรี (เช่น no-ip) บน Router (VPN Server)
ตั้งค่า PPTP VPN Connection บน Windows 10:
1. จาก Settings
คลิก Network and Internet หรือ คลิกขวา ไอคอน Network Taskbar เลือก Open Network & Internet settings

2. คลิก VPN ดานซ้าย คลิก + เพิ่ม VPN Connection

3. หน้าจอถัดไป ใส่ข้อมูลและคลิก Save:
a. VPN provider: เลือก Windows (built-in)
b. Connection name: ตั้งชื่อ VPN Connection (เช่น "VPN_OFFICE")
c. Server name or address: ใส่ Host Name หรือ Public IP ของ VPN Server
d. VPN Type: เลือก "Point to Point Tunneling Protocol (PPTP)"
e. Type of sign-in info: เลือก "User name and password"
f. User Name: ใส่ VPN Username
g. Password: ใส่ VPN Password
h. ติ๊ก "Remember my sign-in info" หากต้องการบันทึก Credentials คลิก Save

4. ภายใต้ Related settings เลือก Change adapter options

5. คลิกขวา VPN Connection เลือก Properties

6. แท็บ Security เลือก Allow these protocols ติ๊ก:
-
- Challenge Handshake Authentication Protocol (CHAP)
- Microsoft CHAP Version 2 (MS-SHAP v2)

7. แท็บ Networking เลือก Internet Protocol Version 4 (TCP/IPv4) คลิก Properties

7a. คลิก Advanced

7b. ยกเลิกติ๊ก "Use default gateway on remote network" คลิก OK สามครั้ง ปิดทุกหน้าต่าง

8. พร้อมเชื่อมต่อ VPN Server 2016 แล้ว

เสร็จแล้ว! แจ้งให้ทราบว่าคู่มือนี้ช่วยได้หรือไม่โดยทิ้งความคิดเห็น กดไลค์และแชร์เพื่อช่วยผู้อื่น