Google Public DNS บน Ubuntu
mrgill | December 8, 2009 | 763 Views
ไม่นานมานี้ Google เปิดให้บริการใหม่นั้นคือ Google Public DNS ซึ่งเป็นบริการสอบถามชื่อและไอพีฟรีของ Google ซึ่งสิ่งที่คุณจะได้จากบริการนี้คือ
1. ความเร็วในการใช้งานบราวเซอร์
2. ความปลอดภัยที่ดีกว่า
3. ได้ผลลัพธิ์ทันทีโดยไม่ต้อง Redirect
มาดูกันว่าเราจะใช้ Google Public DNS บน Ubuntu ได้ยังไง
สำหรับใครที่ใช้ Ubuntu Desktop หรือ Linux Server ที่ Fix IP ก็สามารถเข้าไปแก้ไขไฟล์ /etc/resolv.conf ได้โดยตรง
ตัวอย่าง
root@mrgill-laptop:~# nano /etc/resolv.conf
จากนั้นแก้ไขข้อมูลในไฟล์ /etc/resolv.conf ให้เป็น
nameserver 8.8.8.8 nameserver 8.8.4.4
และสำหรับใครที่ใช้ Ubuntu Desktop แล้วรับ DHCP มาทุกครั้งที่ renew ip เราจะได้ dns ที่ dhcp แจกมาให้ซึ่งวิธีแก้ไขนี้ทำได้โดย
1. คลิกขวาที่ Applet Network Manager บริเวร Notification Area จากนั้นเลือก Edit Connections
Edit Connections
2. จะปรากฎหน้าจอ Network Connections ขึ้นมา แล้วเลือก Connection ที่คุณใช้ ตัวอย่างของผมใช้ Wireless ที่มี SSID ที่ชื่อ mrgill_wifi จากนั้นคลิกที่ปุ่ม Edit
Network Connections
3. จะเห็นหน้าจอ Editing
Editing
ให้เปลี่ยน Method จาก Automatic (DHCP) เป็น Automatic (DHCP) address only
จากนั้นในช่อง DNS servers ให้กรอก 8.8.8.8, 8.8.4.4 ลงไป ดังรูป
Editing (2)
จากนั้นคลิกปุ่ม Apply
4. สั่งให้ Ubuntu ใช้ DNS ที่เพิ่งเปลี่ยนไปโดยคลิกที่ Applet Network Manager จากนั้นเลือกเน็ตเวิร์คที่คุณใช้
เลือก Network ที่คุณใช้งาน


5. ดูผลที่ได้ว่า DNS เปลี่ยนเป็นที่เรากำหนดหรือยังโดยคลิกขวาที่ Applet Network Manager แล้วคลิก Connection Information

Connection Information
สังเกตตรง Primary DNS กับ Secondary DNS จะเป็น IP ของ Google Public DNS แล้ว
หรือใครจะใช้คำสั่ง
root@mrgill-laptop:~# cat /etc/resolv.conf # Generated by NetworkManager nameserver 8.8.8.8 nameserver 8.8.4.4
ก็จะได้ผลเหมือนกัน
6. สุดท้ายก็ทดลองเปิด Browser แล้วเข้าเว็บกันเลยครับผม
รายละเอียดเพิ่มเติม : http://code.google.com/speed/public-dns/


Leave a Comment
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
TrackBack URL | RSS feed for comments on this post.