ºìÁªLinuxÃÅ»§
Linux°ïÖú
µ±Ç°Î»ÖÃ: ºìÁªLinuxÃÅ»§ > Ubuntu

Ò»¸öºÜºÃÓõÄdns»º´æÈí¼þ¼°linux·ÓÉÈí¼þdnsmasq

·¢²¼Ê±¼ä:2013-02-06 23:11:02À´Ô´:ºìÁª×÷Õß:pc0088
ʹÓû·¾³ubuntu 12.04 64λ
Ò»¡¢ÊµÏÖdns»º´æ¼ÓËÙÍøÂç·ÃÎÊËÙ¶È,ÌṩDNS·þÎñ£¬DNSmasqĬÈÏ°²×°¾ÍÊÇÒ»¸öDNSת·¢Æ÷¡£
1¡¢°²×°sudo apt-get install dnsmasq
2¡¢ÅäÖÃ
sudo vi /etc/dnsmasq.conf
resolv-file=/etc/dnsmasq.resolv.conf×¢ÊÍÈ¥µô#ĬÈÏÅäÖÃÏ£¬dnsmasqʹÓÃϵͳµÄ/etc/resolv.conf
sudo vi /etc/resolv.conf
nameserver 127.0.0.1 ÔÚÆäÖÐÔö¼Ó½«ÆäËüµÄȫעÊͼÓ#
sudo vi /etc/dnsmasq.resolv.conf ÔÚÆäÖÐÔö¼Óʵ¼ÊdnsµØÖ·
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 8.8.8.8
3¡¢ÔËÐÐ sudo service dnsmasq start
sudo service dnsmasq stopÍ£Ö¹µÄ»°ÓÃ
¶þ¡¢ÊµÏÖdhcp
²ÎÕÕhttp://wiki.fatduck.org/networking/linux-as-a-router
ÔÚÕâ¶ùÉîÉîµÄ¸ÐлËû£¬ÈÃÎÒѧÁ˲»ÉÙ¶«¶«¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. okzokz123 ÓÚ 2013-02-07 22:18:02·¢±í:

    »ù±¾ÉÏûɶÓã¬Ò»¶Îʱ¼äºó£¬¼¸·ÖÖÓ»òÊ®¼¸·ÖÖÓÔٴβéѯÓÃÒ»ÓòÃûµÄʱºò£¬Õâ¸öDNS»º´æ¾ÍûÓÐÁË£¬ÅäÖÃÀïÉèÎÞ·¨Êµ¼Ê¸ü¸Ä»º´æʱ¼äÉ趨£¬È»¶øÏàÐÅ´ó¶àÊýÈËÔÚ¶Ìʱ¼äÄÚ²éѯͬһÓòÃûµÄÖظ´²Ù×÷µÄ¿ÉÄÜÐÔÒ²²»´ó¡£ËùÒÔ˵ÏԵúܼ¦Àߣ¬¾¡¹ÜÎÒÒ²ÓÃÁ˵ġ£µ«ÊÇÏà¶ÔÓÚbind9µÄ·±ËöÅäÖÃÒª¼òµ¥µÃ¶à¡£

  2. Oersted ÓÚ 2013-02-07 08:48:15·¢±í:

    ²»´í²»´í