OpenDNS Forums
The official support and discussion site of OpenDNS
Support
K-12 Forums
Categories
- Administrative
- Adult site blocking
- DNS-O-Matic / dynamic IPs
- Domain blocking
- Domain Name System (DNS) troubles
- Mobile instructions
- OpenDNS services
- Proxies, accelerators, and more
- Router instructions
- Satellite
- Shortcuts
- Wishlists and feature requests
-
Feeds
Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
This discussion has been inactive for longer than 30 days, and is thus closed.
Domain Name System (DNS) troubles: Updating machines DNS entries via .reg files
Bottom of Page1 to 4 of 4
-
- CommentAuthorbpvwebdesigns
- CommentTimeOct 17th 2007
Hello,
I know this is a bit off topic, but was wondering if the OpenDNS team or a user here is familiar with updating dns entries via the registry, by using a .reg file?
I researched doing this so that I may automate dns changes to clients, by sending them a .reg file to execute. I came across the following but it only applied to a tool in a windows administrator toolkit. They mentioned changes values at this location;
---
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
under the NameServer value, Each dns entry should be separated by a space
---
Wondering if anyone could provide some advice before I proceed to mess about (and yes I will backup the registry at every step
)
Thanks,
Brian -
I doubt you can do it [properly] by a reg file - each NIC probably has a unique registry key.
netsh interface ip set dns "Local Area Connection" static 208.67.222.222
netsh interface ip add dns name="Local Area Connection" addr=208.67.220.220
XP:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx
Vista (dunno if they're different - probably...):
http://technet.microsoft.com/en-us/windowsvista/aa905084.aspxThankful People: bpvwebdesigns -
- CommentAuthorbpvwebdesigns
- CommentTimeOct 19th 2007
Perfect solution, I forgot all about that command.
I just whipped up a simple batch script that works perfectly, here is the code for anyone interested, works fine in win2k.
[code]
title DNS Changer
cls
@echo off
echo DNS Changer
echo (C)2007 BPV Webdesigns
echo http://www.bpvwebdesigns.com
ipconfig /flushdns
netsh interface ip set dns "Local Area Connection" static 208.67.222.222
netsh interface ip add dns name="Local Area Connection" addr=208.67.220.220
ipconfig /registerdns
echo CLOSING . . . . . .
exit
[/code]
Just copy and past it into notepad, and save it as whatever.bat instead of txt, and your good to go ;) -
just a note that this may not work if your NIC is labelled as anything other than "Local Area Connection" (especially if you have more than one NIC eg Laptop with wifi, LAN or more... also Windows Mobile Devices commonly attach as LAN adapters when connected with USB).
To find the name for the interface you'd like to change, open a command window and issues the command
ipconfig /all
All current adapters and their names, find the one you want to use the above file with and then use the found name for the two netsh commands inside that batchfile.
I've uploaded a pic of what my PC has listed here:
http://www.4freeimagehost.com/show.php?i=73c544c8c93f.jpg
1 to 4 of 4
This discussion has been inactive for longer than 30 days, and is thus closed.
