Virtual Private Network (VPN) ใช้สร้าง Protected Connections บน Internet สำหรับ Browsing ที่ปลอดภัย เรียกว่า VPN Tunnels ระหว่าง Local Client และ Remote Server
Setup/Run VPN ยาก ต้องการความรู้/เทคโนโลยีเฉพาะเจาะจง เมื่อ VPN Connection Fail Client จะรายงาน Error Message พร้อม Error Code มี VPN Error Codes หลายตัว แต่บางตัวพบบ่อยและแก้ได้ Error Codes ช่วย Troubleshoot VPN Problems
VPN ส่วนใหญ่เกี่ยวกับ Network Trouthing มาตรฐาน แต่บาง Error Codes มี Solution เฉพาะ มาดูวิธีแก้ Common VPN Errors
Error Message ปกติ:
The VPN connection failed with error code
หรือ:
The error code returned on failure is 789
ข้อควรทราบ: VPN ต้องการ TAP-Windows Adapters ติดตั้งถูกต้อง VPN Software ส่วนใหญ่ติดตั้งอัตโนมัติตอน Install แต่ควรทราบไว้
Troubleshoot Common VPN Error Codes
ในโพสต์นี้แนะนำแก้ VPN Error Codes: 800, 609, 633, 809, 13801, 691, 0x80072746, 0x800704C9, 789, 732, 734, 812, 806, 835, 766, 13806, 0x80070040, 0x800B0101, 0x800B0109, 0x800B010F, 0x80092013, 0x800704D4, 0x80072746
1. VPN Error Code 800
Error Description: VPN Error 800 พบบ่อยที่สุด เกิดเมื่อ Remote Connection ไม่สำเร็จ VPN Server อาจ Unreachable Messages ส่งไม่ถึง Server สาเหตุหลัก:
- VPN Server Name/Address ผิด
- Network Firewall Block VPN Traffic
- Client Device Lost Local Network Connection
- IPSec Negotiations (L2TP/IPSec) Security Parameters Config ผิด
Possible Cause: VPN Tunnel Type = 'Automatic' Connection Fail สำหรับทั้งหมด Tunnels
Solution:
- ตรวจสอบ VPN Server Address, Username, Password ให้ถูกต้อง
- ตั้ง Router/Firewall ให้ Allow PPTP และ VPN Pass-through TCP Port 1723 และ GRE Protocol 47 ต้อง Open/Enable สำหรับ PPTP VPN
- Windows: VPN Properties > Security Tab > Type of VPN = Point to Point Tunneling Protocol (PPTP)

2. VPN Error Codes 609, 633
Error Description:
- 609: A non-existing device type was specified
- 633: The modem or other connecting device is either already in use or not appropriately configured
Possible Cause: VPN Connecting Device (Miniport) Config ไม่ถูกต้อง หรือ TCP Port ที่ VPN ใช้ ถูกโปรแกรมอื่นใช้อยู่
ตรวจสอบ Miniport: netcfg.exe -q <miniport name> ใน Elevated CMD Miniport Names:
- PPTP Tunnel: MS_PPTP
- L2TP Tunnel: MS_L2TP
- VPN Reconnect (IKEv2) Tunnel: MS_AGILEVPN
- SSTP Tunnel: MS_SSTP
Solution:
- Windows มี Built-in Diagnostic/Repair สำหรับ 'Missing Miniport' คลิก Diagnostic Button บน Error Page VPN Connection จะมี Repair Option
- Stop/Start Remote Access Connection Manager (rasman) Service
- Reboot แล้ว Connect VPN ใหม่
3. VPN Error Code 0x80072746
Error Description: Existing Connection Forcibly Closed by Remote Host
Possible Cause: Server Machine Certificate Binding HTTPS ไม่ได้ทำบน VPN Server, หรือ Server Machine Certificate ไม่ได้ติดตั้งบน VPN Server
Solution:
- ติดต่อ VPN Server Admin ตรวจสอบ Machine Certificate ติดตั้งบน VPN Server หรือไม่
- ถ้าติดตั้งถูกต้อง ตรวจ HTTPS Binding: รัน netsh http show ssl ที่ VPN Server CMD
4. VPN Error Code 809
Error Message: VPN Error 809 – Network Connection ระหว่าง Computer และ VPN Server ไม่สำเร็จ Remote Server Not Responding
Solution: Enable Port (ดูข้างบน) บน Firewall/Router หาไม่ได้ Deploy SSTP-based VPN Tunnel ทั้ง Server และ Client (ผ่าน Firewalls, Web Proxies, NAT)
5. VPN Error Code 13801
Error Description: IKE Authentication Credentials Unacceptable
Possible Causes:
- Machine Certificate สำหรับ IKEv2 Validation บน RAS Server ไม่มี "Server Authentication" เป็น EKU
- Machine Certificate บน RAS Server Expired
- Root Certificate Validate RAS Server Certificate ไม่อยู่บน Client
- VPN Server Name บน Client ไม่ Match SubjectName ของ Server Certificate
Solution: แก้เองไม่ได้ ติดต่อ VPN Server Admin Verify/Fix อ่านเพิ่ม: Routing and Remote Access Blog
6. VPN Error Code 691
Error Description: Remote Connection Denied: Username/Password ผิด หรือ Authentication Protocol ไม่อนุญาตบน Remote Access Server
Possible Cause: Authentication Phase Error เนื่องจาก Credentials ผิด
Solution:
- ตรวจ Username/Password ให้ถูกต้อง
- ตรวจ Caps Lock ปิดขณะพิมพ์ Credentials
- ตรวจ Authentication Protocol บน Client ว่าอนุญาตบน Server
7. VPN Error Code 0x800704C9
Possible Cause: ไม่มี SSTP Ports บน Server
Solution: ตรวจ RAS Server มี Ports พอสำหรับ Remote Access:
- Start Routing and Remote Access MMC Snap-in
- Expand Server > Right-click Ports > Properties
- Name List > WAN Miniport (SSTP) > Configure
- แก้ Maximum Ports ตามต้องการ > OK (Default 128 Ports)
- Port Properties > OK
8. VPN Error Code 789
Error Message: VPN Error 789 – L2TP Connection Attempt Failed Security Layer Processing Error During Initial Negotiations
Solution: Generic Error เมื่อ IPSec Negotiation Fail สำหรับ L2TP/IPSec ตรวจ Certificate ถูกต้องทั้ง Client/Server (ดู Blog รายละเอียด) หากใช้ Pre-Shared Key (PSK) ต้องตรงกันทั้ง Client และ VPN Server
นอกจากนี้ยังมี VPN Errors อื่นๆ มากมาย ดูรายการเต็มที่ TechNet รวม Error Codes: 732, 734, 812, 806, 835, 766, 13806, 0x80070040, 0x800B0101, 0x800B0109, 0x800B010F, 0x80092013, 0x800704D4, 0x80072746
