|
Using OpenDNS with DHCP
If you assign your computer's IP with DHCP, it probably overwrites your /etc/resolv.conf. Here's how to fix that:
1. Run: sudo gedit /etc/dhcp3/dhclient.conf
2. Change the prepend line to read:
prepend domain-name-servers 208.67.222.222, 208.67.220.220;
This will prepend the OpenDNS addresses to the top of the list. (You can also use "supersede", which will just use them.) You don't have to worry about the DHCP client overwriting settings on each reboot or lease cycle, and your ISP nameservers will still be used as backup.
3. Run: sudo /etc/init.d/networking restart
第三步我知道是rc.d/network,就不知道dhclient.conf的替代品在哪里? |
|