Tip การ Edit Host File สำหรับ Windows Vista, Windows 7, Windows 8

0
543
Tip การ Edit Host File สำหรับ Windows Vista, Windows 7, Windows 8
Tip การ Edit Host File สำหรับ Windows Vista, Windows 7, Windows 8

Tip การ Edit Host File สำหรับ Windows Vista, Windows 7, Windows 8

ตามหลักการ Resolve Computer Name หรือการแปลงชื่อเป็น IP Address ของ Microsoft Platform จะมีลำดับความสำคัญดังนี้ครับ (รูปอ้างอิงจาก Microsoft Official Book for Student นะครับ)

clip_image002

ลำดับการ Resolve Computer Name ของ Microsoft Platform ครับ

1. Local Hostname

2. DNS Resolver Cache

3. Host File

4. DNS Server

5. NetBios Name Cache

6. WINS Server

7. Broadcast

8. Lmhosts File

กระบวนการค้นหา หรือแปลงจาก Computer Name เป็น IP Address ที่ใช้ลำดับในการ Resolve ดังนี้ ทำให้มีจุดอ่อนหนึ่งคือ Local Hosts File

สถานที่อยู่ คือ

· %systemroot%\system32\drivers\etc\

· C:\windows\system32\drivers\etc\

ซึ่งจะเป็นไฟล์ที่ไม่มีนามสกุลและจัดเก็บไว้บนเครื่องของเราเองครับ เราสามารถเข้าไป Edit ได้ แต่มีเคล็ดลับนิดนึงสำหรับ Windows Vista ขึ้นไปคือหากเราเปิด และ Edit ด้วย Notepad โดยตรง มันจะไม่สามารถ Save ทับไฟล์เดิมได้ครับ เนื่องจาก สิทธิ์ในการเขียนทับไฟล์ไม่พอ

เคล็ดลับที่ปรับแต่ง Hosts File ได้ง่ายและเร็วที่สุด

คือการเปิด Notepad ด้วยสิทธิ์ Administrator (runas administrator) ครับ

clip_image004

เรียก runas administrator ได้จากรูปด้านล่างนี้ครับ ง่ายและสะดวก ถ้าเป็น Vista/Windows7 ก็แค่หา icon ให้เจอแล้วเรียก Runas Administrator หรือถ้ายังไม่มีก็กดปุ่ม Shift ค้างไว้ได้เลยครับ

clip_image005

เลือก Hosts มา Edit แล้ว Save ได้ล่ะครับ

clip_image006