Fetching the DNS servers

Hi
In java version 1.4
How can i get the list of the DNS servers configured on my operating system?
And how can I change the current (primary) dns server the InetAddress class is resolving the hosts with to another one?
Thanks

[root@solaris ~]# cat /etc/named.conf
options {
directory "/var/named"; # Working directory
pid-file "named.pid"; # Pid file in working dir
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
* If there is a firewall between you and nameservers
* you want to talk to, you might need to uncomment the
* query-source directive below. Previous versions of
* BIND always askedquestions using port 53, but BIND
* 8.1 uses an unprivileged port by default.
# query-source address * port 53;
//zone "." {
// type hint;
// file "named.ca";
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
notify no;
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
[root@solaris ~]# mkdir /var/named
[root@solaris ~]# mkdir /var/named/data
[root@solaris ~]# svcadm enable /network/dns/server:default
Now you have you own DNS server

Similar Messages

  • I have an Imac running snow leopard and have recently installed a cannon i-sensys lbp7750Cdn printer since then I can't get the printer working and the air port has lost the DNS servers; if it ever had them!!! but it dose not look happy. Can any one help

    I have an Imac running snow leopard and have recently installed a cannon i-sensys lbp7750Cdn printer since then I can't get the printer working and the air port has lost the DNS servers; if it ever had them!!! but it dose not look happy and it is telling me so. Can any one help please?

    Snow Leopard breaks quite a few drivers - my Canon exhibited the same problem.
    I eventually found updated drivers on the Canon website. You can try that with the HP, but if the all-in-one is more than a year or so old, don't hold your breath.
    You can also try Software Update to see if it will offer new drivers, or failing that go to the Support Downloads site and search for HP updates.
    In fact there's a new one for HP at the top of the list just now.
    You may not necessarily want the latest one, though - check the specs to see if your model is covered; if not, search for the previous update etc.

  • How can I override the DNS Servers and Domain Name used by my Airport Time Capsule?

    The defaults picked up from my ISP's DHCP are to use the ISP's DNS servers and ISP's domain. I do not want this.
    With my prior router I set the DNS servers to Google's Public DNS (8.8.8.8 and 8.8.4.4) and my domain to either "bannister.us" (which I own) or "bannister.home". I do not want simple names resolving to some ISP default. (Yes, I know exactly what this does.)
    In the Apple AIrport Utility (version 6.3.2) the fields for DNS and Domain do not allow editing. (Why??)
    Is there some way to override this?

    Unfortunately not one that will work with the latest version TC.
    The way around it is to use a different router.. It can be a very simple router.. I usually recommend units like the TP-Link WDR3600 as they take good third party firmware like gargoyle, openwrt, dd-wrt.. ie they have real controls and beyond that a proper Linux firmware with command line interface.
    You can then change the TC over to static IP. It will not be the router.. but it will effectively become the local dhcp server.
    I have adsl so I cannot reproduce your system.. I have a bridged modem.. a router.. AC66U.. and a TC.. but the TC is not in bridge.. it is in static IP mode.
    Let me demonstrate.
    By setting a range on the main router from 1-199 (leave a space.. ) so set the TC to 192.168.2.201 and then you can set DNS and domain as you like. Set the dhcp range (leave a space) you could use 203-253.. then I use the main router as 254.
    It is brilliant.. all computers behind the TC receive the IP from the TC with whatever IP and dns (and domain although I haven't changed it).. Effectively the TC works as its own dhcp device.. but is merely a secondary dhcp server to the main unit.
    (This gives me netflix which is why I do it.. from well outside the US).
    It may be of use.
    Why leave a space.. well it helps it to work.. I have not tested it but another person reported issues and found leaving a space .. ie last ip in the router.. 199, static ip 201.. first dhcp 203 (i used 205 to help me keep count!!). worked.. I have not tried to reproduce the problem.. so I reproduce the solution.. it might be like sheep jumping over the fence.. even if the fence was removed the sheep keep jumping over at the same place. Just say bahhh and do likewise.

  • What is going on with the DNS servers?

    I've been having intermittent connection problems with "DNS Server Not Responding" identified as the error by Win 7 troubleshooting for a little while now.
    This has been sporadic for a couple of months and usually resolves itself after a short time, but in the last few days I've barely been able to access the internet at all, with the exception of a handful of websites and today it came to a head and I could only access a couple of websites for most of the day.
    Thankfully I finally managed to find a website that I could access to remind myself of the addresses for the free google DNS servers and am now back online.
    Just wanted to stop by to report the issue and ask What on earth is going on with BTs DNS servers? 

    Hi Epona222,
    Thanks for posting. There are no reports of any specific issues with DNS servers but I can check your connection etc for you if you wish. Drop me an email with the details. You'll find the "contact us" form in the about me section of my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • How can I make Firefox recognise that I have changed the DNS servers to use?

    After I edit /etc/resolv.conf to make my computer use more reliable DNS servers, Firefox doesn't notice until I restart it. How can I make Firefox notice the change without restarting it?

    I discovered that I can do this by ticking Work Offline in the File menu, and then immediately unticking it again.
    (I believe this mimics what would happen if the operating system disconnected and reconnected from a wireless network, which would be a situation where Firefox would need to check for new DNS servers. So that explains why it works.)

  • Re:How fetch the other servers data using fm:TH_SERVER_LIST

    Hi,
    using this function module TH_SERVER_LIST i could fetch the data from current server but i'm unable to
    do the same from other servers,so plz tell me how to fetch the data from other servers.
    Regards
    narendar

    This is RFC-enabled FM so you can give RFC destination of other servers.

  • 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

  • BUG in IMS 5.2 P 1 on Windows 2000 : not using the correct DNS servers

    Hi everyone,
    I encountered a queer bug in Ims 5.2 on Windows 2000.
    Let me explain it to all of you to avoid spending time and money debugging this problem.
    The problem may occur on Windows 2000 Server if the server used was formerly configured to obtain its IP address from a DHCP server (before using it for mail purposes).
    Windows 2000 doesn't delete its DHCP client configuration even if the machine is re-configured with a static IP.
    It stores the information in an interface registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
    If you install IMS52 after this, the server will use the DNS servers configured in the DHCP configuration rather than the ones specified in the static IP config to lookup the MXs.
    So if the nameservers configured in the DHCP config are not reachable, the smtp server will systematically fail sending outbond mails.
    To avoid this, locate the DHCP interface key in the Registry and remove it.
    Remarks :
    I know that this situation is not common but it may occur in certain occasions for people like me who are making demonstrations on clients sites.
    I'm not sure it is specifically related to DHCP rather than static config. I would say that IMS uses the first interface found in the registry (in alphabetical order) even if this interface is not active...
    A good idea is to remove completely from the registry all the interfaces keys not currently used by the system.
    Hope this will help some of you.
    Best regards,
    Vincent MAZARD
    DML FRANCE

    Interesting. Thank you for the observation. Not something I have seen, either.

  • Hardcoded DNS Servers into the Firmware

    Hi all,
    I have WAG200G Linksys router and I need to customize it to force using of a specific DNS servers "as a kind of filteration"
    Is it possible to:
    1-edit the firmware to hardcode a specific DNS servers to be used by the router and all LAN users. I know that this could be done on the software level by specifiying the DNS servers in the router configurations. but I need this to be hardcoded.
    2-if the first issue was applicable, is it possible to filter all DNS queries  generated by LAN users and pass only requsts to the hardcoded DNS servers. I need to implement this as LAN users might simply specify static DNS servers on their computers to bypass filteration done at the router level.
    Thanks in advance ! 

    Answer would be NO unless you have an OpenSource firmware or a 3rd party firmware that you can self-code and load into a WAG200. Other than that you can only specify DNS Addresses within the router webUI. It would be best if you will set up a DNS Server and have all computers go through it so that you can control whatever DNS-related stuff you want. Also, you will mess up your network access if you assign static DNS addresses since the primary computer query will have to go through your DNS Server. This would discourage network users from assigning their own Static DNS Servers.

  • AD intigrated DNS servers don't look the same but function perfectly, What am I missing?

    I have a fully functional Active Directory network with integrated DNS servers (2). When I look at one of the DNS servers (both 2008R2 Domain Controllers)  under the forward lookup zones I see all of my workstations, servers and other network devices
    as I would expect to see them however when I look at the other DNS server all I see is what appears to be stub zone data.
    On the questionable server I see
    SOA start of authority listing
    Name server  XXXXXXXXX
    Name Server XXXXXXXXX
    and one host(A) record for a server
    But there are no workstation or other servers in my network listed.
    If I query the questionable server it replys with the correct DNS information as though it is resolving the address query but I just see no workstation or server listings under Forward lookup zones.
    I can run dcdiag /test:dns and it all passes with the exception of a few failed external root servers which I see now and then. DNS testing tells me it is all working and I have no errors in my system logs.
    Shouldn't I be seeing an exact copy of DNS records on both servers or did something change?
    All DNS tests I have run tell me everything is well and good but I am not seeing what I think I should be seeing.
    HELP

    Hi,
    If your qeustionable DNS server and the another DNS sever are in the same domain and both of them are the AD integrated zone, we should see the exact copy of DNS records on both servers.
    Please try to trigger the replication of the domain controller then reload and refresh the DNS zone.
    If it doesn't work, please try to create a test record on the questionable server, then check if the record has been replicated to the another server.
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Airport not distributing DNS servers over network

    Hi everyone,
    I connect to the Internet over ADSL (ISP: Arnet Highway, Buenos Aires, Argentina) using PPPoE from my MacBook Pro.
    I have my ADSL modem connected to the Airport Extreme (802.11n) and distributing IP over DHCP just fine. Every device that joins the network obtains a valid IP.
    However, DNS servers aren't distributed by the router over the network. Every connected device has to be manually configured to set the DNS servers of my ISP to be able to resolve hosts, instead of 'asking' these addresses to the router, as it should be.
    Initially I thought there might be a problem obtainig the DNS servers from the ISP. So in the Airport Utility, in Internet / PPPoE settings, I've manually set my ISP's DNS servers, which should be distributed over the network to all connected devices.
    This doesn't happen, and every somebody new joins my wireless network I have to manually change the DNS servers for that connection which, as I'm sure you'll agree with me, can be quite annoying. Not to mention what would happen if my ISP decides to use dynamic DNS addresses.
    Thanks for any help you might provide.
    Cheers.

    Hello belbo,
    I connect to the Internet over ADSL using PPPoE from my MacBook Pro.
    Is your Macbook Pro Network configured to use PPPoE or DHCP?
    I have my ADSL modem connected to the Airport Extreme (802.11n) and distributing IP over DHCP just fine. Every device that joins the network obtains a valid IP.
    Is NAT enabled on the AE? Are the valid IP Address obtained from your ISP or from the AE?
    However, DNS servers aren't distributed by the router over the network. Every connected device has to be manually configured to set the DNS servers of my ISP to be able to resolve hosts, instead of 'asking' these addresses to the router, as it should be.
    When you setup the AE to use PPPoE did you enter a Domain Name or a DHCP Client ID?
    Initially I thought there might be a problem obtainig the DNS servers from the ISP. So in the Airport Utility, in Internet / PPPoE settings, I've manually set my ISP's DNS servers, which should be distributed over the network to all connected devices.
    The DNS servers listed in the AE aren't distributed to each Network Device but are only used to translate names into IP addresses when need by a Network Device.
    This doesn't happen, and every somebody new joins my wireless network I have to manually change the DNS servers for that connection which, as I'm sure you'll agree with me, can be quite annoying. Not to mention what would happen if my ISP decides to use dynamic DNS addresses.
    If your AE is distributing IP Address using DHCP and NAT then this should not be a problem but I'm not sure without more information about the questions I asked.
    Later.
    Buzz

  • Time Capsule - No DNS servers and Double NAT

    I'm connecting an MBP running 10.5.6 to a Time Capsule which accesses Virgin Media broadband using a cable modem.
    It has been working fine for 6 months, but I made some changes this morning to get my wireless camera onto the network, which broke the connection, and don't seem to be able to undo them.
    The TC now flashes amber, and going into Airport Utility I get the following errors:
    - No DNS Servers
    - Double NAT
    I've typed the DNS servers' IP addresses for my ISP into Airport Utility but it doesn't seem to recognise them. It also complains about a double NAT problem but I don't have another router assigning IP addresses.
    I've also tried a hard reset on the TC, switched it and the modem off, waited 30 mins and then switched back on again - no luck.
    Screenshots of all the settings on my TC from Airport Utility are here:
    http://web.me.com/julianlove/Site/TimeCapsule.html
    I'm not very knowledgeable about networking so any assistance appreciated.

    Double NAT is an indication that you have two devices on the network both trying to perform routing duties. You only want one device doing this on a network. Solve the NAT issue and the DNS issue will go away as well.
    What is the make and model number of the device that you call your "modem"?

  • Unix command in ARD to remove DNS Servers from Network prefs?

    I need to know how to send a unix command to remove DNS Servers in Network preferences. I need the DNS Servers field to be blank. Can this be done?

    Our network administrator is getting ready to change the IP address of our DNS server. This means I have over 30 Macs that will be needing changes to their DNS settings. Since each machine is setup with limited access to the system prefs, that means I have to go to each machine and log in as the admin user to make this change. In the interest of saving time, is this something I can do with Remote Desktop and how? Would I use the same commands in this post and replace dns1 with our DNS' new IP address? Will this distrupt the users access to the network when I do so?
    Thanks for any help.
    Beth

  • Configuring airport DNS servers

    I use an airport extreme base station which connects to the internet via an ethernet DSL connection. The airport TCP/IP settings are DHCP. The DNS servers, however, show 192.168.1.1 and not the DNS settings of the DSL. As a result the internet connection on my MacBook Pro is patchy at best with some pages that open and images not showing up. The only way I resolve this is by manually setting the DNS servers in my settings on the laptop. I have tried manually setting the DNS configuration on my Airport but for some reason this does not broadcast to all the computers in my house. The DNS settings that do appear on computers are the standard 192.168.1.1 and not the actual DNS. I cannot seem to figure out why the airport is doing this. Any suggestions would be appreciated.

    I am also wondering if it is possible to turn DNS relay off on an Airport Extreme or Airport Express. I am using the latest firmware on both devices, 7.6.1 and they are the latest model.
    Regarding your question about DNS servers; the IP address that shows in your device as a DNS server is the Airport Extreme LAN IP address. DNS queries will be sent to that device, and the DNS settings which it uses will be used to look domain names up.
    So, for now, put the DNS server addresses you'd like to use on your Airport Extreme. This is done through the Airport Utility, under Internet > Internet Options.
    Also, as a final note, try the ' namebench ' program to find the best DNS servers available. It helped me choose ipv4 dns servers and I'm noticing a difference in loading times.

  • Where does the ACS server get the DNS info for IP pools?

    I am trying to change the DNS servers that my VPN users are assigned from the IP pools on the ACS server. Where does the IP pools get the DNS server information. I have changed the DNS Ips on the windows server and rebooted. But the VPN clients are still being assigned the old DNS servers.

    ACS ip pools do not push DNS server information
    It is either being forwarded from VPN concentrator group setup or
    it is being send from ACS user/group setup > Radius(VPN 3000) attributes > [026/3076/005] Primary-DNS.
    Hope this helps.
    Regards
    Rohit

Maybe you are looking for