ป้ายกำกับ: Profile

MacOs: Secure DNS (DNS over HTTPS/TLS )MacOs: Secure DNS (DNS over HTTPS/TLS )

ส่วนนี้เป็นการตั้งค่า Secure DNS ต่อจาก MacOs: เข้าเว็บโดนบล็อก เฟสบุ๊คได้ทั้งหมด ทุกเว็บ เพื่อให้การคุยกับ DNS ถูกเข้ารหัส ISP มองไม่เห็นว่าเราเข้าเว็บอะไร แต่บน macOS การจะเปิด Secure DNS ทั้งระบบ ไม่สามารถใช้คำสั่ง Terminal บรรทัดเดียวได้ ต้องใช้วิธีลง “Configuration Profile” ฝังลงไปในเครื่อง ยิ่งเป็น Tahoe จะเข้มงวดกว่า version ก่อน ๆ


สคริปต์สร้างไฟล์เปิด Secure DNS

nano ~/Desktop/SecureDNS.mobileconfig
แล้วใส่เนื้อหา

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>PayloadContent</key> <array> <dict> <key>DNSSettings</key> <dict> <key>DNSProtocol</key> <string>HTTPS</string> <key>ServerURL</key> <string>https://cloudflare-dns.com/dns-query</string> </dict> <key>PayloadDescription</key> <string>Configures Cloudflare DNS over HTTPS</string> <key>PayloadDisplayName</key> <string>Cloudflare Secure DNS</string> <key>PayloadIdentifier</key> <string>com.cloudflare.dns.doh</string> <key>PayloadType</key> <string>com.apple.dnsSettings.managed</string> <key>PayloadUUID</key> <string>19398741-9685-4240-9755-385203362664</string> <key>PayloadVersion</key> <integer>1</integer> </dict> </array> <key>PayloadDescription</key> <string>Adds Cloudflare DNS over HTTPS to macOS</string> <key>PayloadDisplayName</key> <string>Cloudflare DNS over HTTPS</string> <key>PayloadIdentifier</key> <string>com.custom.dns.profile</string> <key>PayloadOrganization</key> <string>User Custom</string> <key>PayloadType</key> <string>Configuration</string> <key>PayloadUUID</key> <string>33555053-4853-4155-8086-116568658087</string> <key>PayloadVersion</key> <integer>1</integer>
</dict>
</plist>

วิธีติดตั้ง

เนื่องจากเป็นเรื่องความปลอดภัย Apple บังคับให้คุณกดอนุญาตเองครับ

  1. Double Click ไฟล์ SecureDNS.mobileconfig ที่โผล่มาบน Desktop
  2. จะมีคำถามประมาณ
    Profile Downloaded
    Review the profile in System Settings if you want to install it.
    ให้คลิก OK
  3. ไปที่ System Settings (ตั้งค่าระบบ)
    • macOS Tahoe ไปที่ Device management
    • macOS ไปที่ Privacy & Security -> เลื่อนหา Profiles
    • macOS เก่า: ไปที่ Profiles
  4. จะเห็น Profile ชื่อ “Cloudflare DNS over HTTPS”
  5. ให้กด Install
  6. จะมีคำยืนยันอีกครั้ง
    Are you sure you want to install profile “Cloudflare DNS over HTTPS”?
    The author of this profile is unknown. Make sure you trust the sender before installing.
  7. กด Install
  8. ใส่ password
  9. OK

ผลลัพธ์ที่ได้

เมื่อติดตั้งเสร็จ เครื่อง Mac ของคุณจะใช้ Secure DNS ตลอดเวลา และถ้าไปดูในหน้า Network จะเห็นสถานะเป็น Encrypted หรือมีไอคอนกุญแจครับ ถ้าไม่ได้ ให้ดูว่ามี VPN ติดตั้งอยู่มั๋ย เป็นสาเหตุหลักที่บางโปรแกรมจะขัดขวางการทำแบบนี้ เราแก้ได้โดยการลบ profile นี้ไป

อ่านเพิ่มเติม