Pragmatically change the DNS server

I have been trying to figure out how to write a program to change the DNS server, like you can in the control panel. I have played with Resolv.conf and a whole bunch of low level APIs.
From the terminal window, things like nslookup work (use the right dns server) but Safari doesn't. It still is using the original DNS server. I can stop and start safari and go to web pages it has not visited before and it still uses the old DNS server, so its not just pulling up cached pages.
It seems the low-level API stuff doesn't work for higher level applications like Safari (its the only high level app I know of that uses DNS to test with).
What is the API to use to change the DNS server address such that everyone,, like safari, will use the new DNS address?

Yeah, but I am changing all the DHCP entries in the system and it still gets out. However, it is solved by updating the system config. I was just curious as to where it got its DHCP server info from when the system config was blank and resolv.conf was set to my DHCP server.

Similar Messages

  • DNS Host record of a computer is deleted after you change the DNS server assignment

    Hi All,
    This is a critical bug in Windows 7/Windows 2008 and Windows 2008 R2. Is there any way to get rid of it? I am planning for for a deployment with new DNS server IPs.
    Thank you.

    Hello,
    please see http://support.microsoft.com/kb/2520155/en-us
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://msmvps.com/blogs/mweber/
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

  • My modem works just fine, but my airport extreme refuses to connect to the internet.  I even reset it more than once, changed the DNS servers and still nothing.  Help

    Ok so recently we were having problems with our phone.  We had to disconnect our modem in order to fix the phone lines and when that happened, our airpot extreme disconnected itself from the internet.  No matter what I did i could not get it to connect back.  I would power down the modem, I would reset the AE and nothing would happen.
    I tried changing the DNS server and nothing happened.  I always get the same messages in the airport utility app: No internet connection and no DNS server
    Nothing I seem to do works.  I do know for a fact though, that the problem is not the modem.  I have connected it through ethernet to other devices and the internet has worked just fine. 
    Please please please if anybody sees this help me out!!

    Since you feel good about having internet access up to your Airport, I would suggest as a next step checking your Airport's status light to see if it is giving any clues as to what may be going on. Below is some info on what the light can indicate
    AirPort Express Status light sequences and what they indicate.
    No light (Off) - AirPort Express is unplugged
    Solid green - AirPort Express is on and working properly.
    Flashing amber - AirPort Express is not set up or cannot establish a connection to the network or
    the Internet. Use AirPort Utility to find out the cause. See “If Your AirPort Express
    Status Light Flashes Amber” on page 20.
    Solid amber - AirPort Express is starting up.
    Flashing amber and green - There may be a problem starting up. AirPort Express will restart

  • How do I change the settings for the DNS server on...

    I am connected to the network but I can't access the internet unless I change the DNS servers, I can see the IP address, gateway and DNS settings but there doesn't seem to be anyway to edit them. Please help!  I don't want to have to return the phone.

    Vpedrosa wrote:
    I am connected to the network but I can't access the internet unless I change the DNS servers, I can see the IP address, gateway and DNS settings but there doesn't seem to be anyway to edit them.
    You can't as here:http://answers.microsoft.com/en-us/winphone/forum/wp7-wptips/how-to-set-manual-ip-dns-in-nokia-lumia...
    Happy to have helped forum with a Support Ratio = 42.5

  • How do I have a cRIO register its IP address with the DNS server, clearing any previous entries?

    I've run into a problem when I try to move a cRIO-9073 from one network segment to another (say 10.1.33.x to 10.1.36.x):  The old IP address remains registered on our DNS server, so trying to access the cRIO by its DNS name fails as the DNS server tells my PC to look for the old IP address.
    When I search the DNS server from my PC using "NSLOOKUP" with the old IP address, it finds the DNS name of the device.  If I repeat the search with the new IP address (MAX finds the device with its new address, but I hate to have users use MAX to find it), it again returns the DNS name, so it appears the DNS name is registered under two IP addresses on our DNS server.  I've also repeatedly tried to flush my PC's DNS cache using command "IPCONFIG /FLUSHDNS", but it still tries the old IP address.  I also see in MAX that the cRIO is using the same DNS server my PC uses.
    Our IT people say that I have to tell the device to re-register its DNS name.  They told me a command to do it from Windows (command "ipconfig /registerdns"), but obviously this is VxWorks on the cRIO.  Is there a command to do this on the cRIO or a setting in the "NI-RT.INI" file I can change?  I honestly don't think this is the issue (as it successfully registered the new IP address under its name), but I want to try it if it's possible.
    Thanks!
    Erik
    ps - Our IT dept. won't let me use static IPs unless I get them assigned by both their MAC address AND the network jack they're connected to, so that's out.

    Normally this is actually a function of your DNS server. It needs to perform a periodic flush of stale records. You can check the RFC for the DNS protocol and build the necessary packet yourself.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Changeip command? Trying to view or change the DNS name of a computer.

    Hey guys, I did a time machine on computer but it is still remembering the old DNS name.
    I looked it up and it looks like you can use the changeip command to change the DNS name but when i try and run the command it says changeip command not found.
    Any ideas?
    Thanks!

    Hi
    Apple have changed (sic) the changeip command. In 10.6 Server it now does not have the same functionality it used to have in previous versions. Reason being it was not always successful in doing what it was supposed to do. To change the hostname use scutil:
    sudo scutil --set HostName thenameyouwant
    The changeip command does not exist on the client OS.
    Tony

  • I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I have changed the DNS number to 8.8.8.8, I have worked on this for 2 days and still can't find a fix, HELP!!

    I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I haves changed the DNs number to 8.8.8.8, I have worked on this for 3 days now, HELP!!!!

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • I can't connect to the itunes store and have some problems with other websites. Some websites load OK. I had the same problem on my iPad and changed the DNS, but don't want to do this on my iMac, anyway, surely I should have my router's DNS?

    I can't connect to the iTunes store from my iMac and have problems loading a number of other websites, however some websites load perfectly well. I have had the iTunes store issue on my iPad and resolved it by changing the DNS but surely I should use the DNS for my router. I don't really want to change it for the iMac as I access secure sites with it to internet shop.
    Any ideas, I was going to try loading Chrome but can't get it without going through the iTunes store. Anyway, that is treating the symprom not the cause.

    Adding Open DNS codes to your Network Preferences, should give good results in terms of speed-up as well as added security, (including anti-phishing and redirects) (Full information about Open DNS is here: http://www.opendns.com/home/nobloat ) and further independent information can be read here:
    http://reviews.cnet.com/8301-13727_7-57338784-263/free-dnscrypt-tool-enhances-ma c-web-security/?tag=mncol;txt
    and here:
    http://www.macworld.com/article/1146064/troubleshootdns.html?t=234
    Open System Preferences/Network. Double click on your connection type, or select it in the drop-down menu, and in the box marked 'DNS Servers' add the following two numbers:
    208.67.222.222
    208.67.220.220
    (You can also enter them if you click on Advanced and then DNS)
    Sometimes reversing the order of the DNS numbers can be beneficial in cases where there is a long delay before web pages start to load, and then suddenly load at normal speed:
    http://support.apple.com/kb/TS2296

  • The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.

    got event ID 4015 and source DNS-Server-Service. please suggest how to fix this issue
    The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.
    Raj

    Hi
     first run "ipconfig /flushdns" and then "ipconfig /registerdns" finally restart dns service and check the situation,also you can check dns logs computer management ->Event viewer->Custom Views->Server roles->DNS.

  • How do I change the DNS settings to BC but keep the MX setting for emails?

    How do I change the DNS settings to Business Catalyst but keep the MX settings for emails?
    I'm basically created anew site using Muse and want to host it on BC and upgraded to the Web basics + to allow for hosting of downloadable pdf's etc.
    There are up to 50+ emails address set up on the current set up and I want to just change the NDS settings for the domain to ponit to the new site/hosting an not have to worry about them chaning all the meail settings etc.
    Records do I need to change in BC?
    Thanks
    Iain

    Hi,
    You shouldn't need to do anything as long as you do not state hosting email with BC.  Just ensure to check you DNS in a lookup tool that it's still referencing your external email service.
    Otherwise you can set up external email set-up if the option is present.
    - http://helpx.adobe.com/business-catalyst/partner/set-email-external-email-provider.html
    Kind regards,
    -Sidney

  • 2K8 - Best practice for setting the DNS server list on a DC/DNS server for an interface

    We have been referencing the article 
    "DNS: DNS servers on <adapter name> should include their own IP addresses on their interface lists of DNS servers"
    http://technet.microsoft.com/en-us/library/dd378900%28WS.10%29.aspx but there are some parts that are a bit confusing.  In particular is this statement
    "The inclusion of its own IP address in the list of DNS servers improves performance and increases availability of DNS servers. However, if the DNS server is also a domain
    controller and it points only to itself for name resolution, it can become an island and fail to replicate with other domain controllers. For this reason, use caution when configuring the loopback address on an adapter if the server is also a domain controller.
    The loopback address should be configured only as a secondary or tertiary DNS server on a domain controller.”
    The paragraph switches from using the term "its own IP address" to "loopback" address.  This is confusing becasuse technically they are not the same.  Loppback addresses are 127.0.0.1 through 127.255.255.255. The resolution section then
    goes on and adds the "loopback address" 127.0.0.1 to the list of DNS servers for each interface.
    In the past we always setup DCs to use their own IP address as the primary DNS server, not 127.0.0.1.  Based on my experience and reading the article I am under the impression we could use the following setup.
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  127.0.0.1
    I guess the secondary and tertiary addresses could be swapped based on the article.  Is there a document that provides clearer guidance on how to setup the DNS server list properly on Windows 2008 R2 DC/DNS servers?  I have seen some other discussions
    that talk about the pros and cons of using another DC/DNS as the Primary.  MS should have clear guidance on this somewhere.

    Actually, my suggestion, which seems to be the mostly agreed method, is:
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  empty
    The tertiary more than likely won't be hit, (besides it being superfluous and the list will reset back to the first one) due to the client side resolver algorithm time out process, as I mentioned earlier. Here's a full explanation on how
    it works and why:
    This article discusses:
    WINS NetBIOS, Browser Service, Disabling NetBIOS, & Direct Hosted SMB (DirectSMB).
    The DNS Client Side Resolver algorithm.
    If one DC or DNS goes down, does a client logon to another DC?
    DNS Forwarders Algorithm and multiple DNS addresses (if you've configured more than one forwarders)
    Client side resolution process chart
    http://msmvps.com/blogs/acefekay/archive/2009/11/29/dns-wins-netbios-amp-the-client-side-resolver-browser-service-disabling-netbios-direct-hosted-smb-directsmb-if-one-dc-is-down-does-a-client-
    logon-to-another-dc-and-dns-forwarders-algorithm.aspx
    DNS
    Client side resolver service
    http://technet.microsoft.com/en-us/library/cc779517.aspx 
    The DNS Client Service Does Not Revert to Using the First Server in the List in Windows XP
    http://support.microsoft.com/kb/320760
    Ace Fekay
    MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007 & Exchange 2010, Exchange 2010 Enterprise Administrator, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.
    I agree with this proposed solution as well:
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  empty
    One thing to note, in this configuration the Best Practice Analyzer will throw the error:
    The network adapter Local Area Connection 2 does not list the loopback IP address as a DNS server, or it is configured as the first entry.
    Even if you add the loopback address as a Tertiary DNS address the error will still appear. The only way I've seen this error eliminated is to add the loopback address as the second entry in DNS, so:
    Primary DNS:  The assigned IP of another DC (i.e. 192.168.1.6)
    Secondary DNS: 127.0.0.1
    Tertiary DNS:  empty
    I'm not comfortable not having the local DC/DNS address listed so I'm going with the solution Ace offers.
    Opinion?

  • Can I change the smtp server with Yahoo push account?

    My yahoo email account will send and receive over EDGE using the default yahoo mail settings. On my home Cox internet WiFi network I can retrieve messages but cannot send. When sending it says it was sent and makes the "swooshing" mail sent sound, but the message disappears. It does not appear in the "sent" folder or "drafts" folder either. No error message is returned.
    I suspect this is related to Cox blocking the smtp server, but the iPhone does not allow me to change the smtp settings on the default yahoo account. Does anyone know how to do this? I can set it up manually for POP access, but then I'm flooded with spam.

    No, you cannot change the SMTP server on the Yahoo push account.
    Yahoo push only works if you configure your account using the Yahoo! Mail shortcut on the iPhone, and that shortcut does not allow for ANY customization.

  • Does changing the SQL Server Service Account impact FILESTREAM data?

    I have a stand-alone SQL Server 2008 instance that I need to change the SQL Server service account from LocalSystem to a domain account.  However, I was wondering if there was any impact on FILESTREAM enabled databases that are hosted on the SQL Server? 
    Specifically, has anyone ever changed the SQL Server service account when using FILESTREAM ...
    Sincerely,
    Sean Fitzgerald

    I have a stand-alone SQL Server 2008 instance that I need to change the SQL Server service account from LocalSystem to a domain account.  However, I was wondering if there was any impact on FILESTREAM enabled databases that are hosted on the SQL Server? 
    Specifically, has anyone ever changed the SQL Server service account when using FILESTREAM ...
    Sincerely,
    Sean Fitzgerald
    BOL says : Only the account under which the SQL Server service account runs is granted NTFS permissions to the FILESTREAM container.So,  if you start SQL Server under different account , that account wil have access to use fliestream data (read / write)
    At the database level ,If a user has permission to the FILESTREAM column in a table, the user can open the associated files..
    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/

  • Charm Impact on changing the production server

    Hi All,
    we currently using Charm for a three system ECC landscape.
    Now currently so many changes are there in various stages.
    now , the team is planning to change the production server to high availabitlity server.
    there will not be any change in the transport route and all, only instead of existing server, the new server details will be added.
    I just wanted to know will there be any major impact in the current chagnes.
    kindly advice.
    Thanks,
    Subhashini.

    Hi
    its like system migration to the new server? or it is by client export?
    can you refer the thread [How to replicate Existing running Production server.|How to replicate Existing running Production server.]
    and read the note [Note 1395727 - ChaRM project does not work after product version changed|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1395727]
    more further on
    [Note 1394820 - SMSY: Converting SAP ECC system to SAP ERP system|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0001394820&nlang=E]
    check and update
    jansi

  • How to change the web server??

    How to change the web server in the details of the mobile application component in the MI webconsole??

    hello irene,
    had your tried checking on the "Use IP instead of host
    name" checkbox?
    to edit your registered application info, go to
    "Upload Mobile Component" tab and click on the Edit icon
    on the left part of the record list which corresponds to
    the application you had just uploaded.
    your application is uploaded to the same host as your
    web console application is running on. if you like to
    point it to a different server where you have your
    archive accessible, you have to change your mcd
    deployment attributes on your middleware. try the ff:
    1)run tcode: mi_mcd
    2)click on Create Mobile Component
    3)Enter Mobile Solution Name and Version
    4)Click on Display MCD
    5)Select Deployment Tab
    6)Click on Edit
    7)Change the values of WEBSERVER and WEBPATH location eg.
      if your archive is located at
      http://myotherserver:80/archive/myapplication.war
      your entry will be:
      WEBSERVER: http://myotherserver:80
      WEBPATH: /archive/myapplication.war
    where you myotherserver is the name of your http host
    server and myapplication.war is the name of your archive.
    the archive directory is just a virtual directory where
    your application archive is.
    you might need to change the port number depending on
    your http server port.
    regards
    jo

Maybe you are looking for

  • How to enable "Shift-F6" or "Copy Record" feature in custom Forms

    I am looking for sample code or setup to enable Shift-F6 (Copy Record) functionality in multi-record block of a custom Form. If someone has tried it earlier, can you pls share. Or, point me to a documentation which has these details. Thanks.

  • Scanner input error

    I want to make a very simple program that allows the user to enter a key/character and have the corresponding unicode value returned. The problem is that I receive an error after the input of any character. Here is the code: import java.util.Scanner;

  • Table with varying number of columns

    Hello experts, my issue: I need to print a table with varying number of columns. Depending on if all cells of a certain column are initial the whole column should disappear. Hiding is not enough. If this columns is in the middle of the table the foll

  • Unable to update SQL Developer 4.0 EA1 to EA2

    Hi All Could any one please help me in updating SQL Developer 4.0 EA1 to EA2 using a Local File installation... I have a proxy which is blocking me from updating my SQL Developer.. I would appreciate if any once could share any link which contains a

  • Release strategy for PREQs created from PM work order

    Hi All, I have an issue with determining  release strategy for purchase requisition for external services created via PM work order (iw31 transaction). We have activated release strategy for Purchase requisition based on the following characteristics