How to dynamically find DNS server

Is there any way to dynamically find out the address of the local DNS server strictly using java?? i.e. with out looking in etc/resolv.conf or using Runtime.exec and running some machine dependent command??

Some quick thoughts (I have a meeting in five minutes):
Send out dhcp requests and see if you get the answer back. This requires that your applet can send broadcast ip packets, which is beyond what can be done with a normal unsigned applet, but maybe permission can be granted for signed applets. You will have to find a dhcp client library or implement a partiel one yourself.
Open /etc/resolf.conf or whatever the equivalent resource is on other operating systems, then use that name server.
Put a list of known good dns servers in a file on the webserver the applet is loaded from. Keep the list updated, as servers disappers. If you stick to DNS servers of more stable looking companies, and have say five on the list, then at least one is likely to be available at all times.

Similar Messages

  • HT4641 How do I find my server address in WebDAV

    How do I find my server address for WebDAV?
    Would I have to create one?
    -ipad 4gen
    -ipages

    You would have to ask the people who run the server you want to use whether they support webdav and what the address is.
    What is it exactly that you want to do?
    Here is a way to use webdav with dropbox, if that is your goal
    http://dropdav.com/

  • How to install external DNS Server on Windows server 2008?

    After 2 days hard working I'm confused about DNS servers.
    i registered a domain name and want to host my own DNS for my website.
    i install DNS Role and IIS on a windows server 2008 R2 and config them all and set 127.0.0.1 and 8.8.8.8 on my network interface on my serve .
    on my server i have 2 website
        dns1.mysite.com //to set it on my domain panel as name server
        mysite.com      //hosting
    now everything work on my server , when i type mysite.com at my web browser i can see my site.and when i ping mysite.com it reply my server static ip.
    but on internet it does not work. i mean if you type dns1.mysite.com or mysite.com not works and i got request time out when i ping theme.
    at this state if you set my server IP as DNS server at your network adapter(interface) everything work great.
    how can i have a DNS Server like that hosting using on our domains like dns1.godaddy.com ?
    i should register my DNS on any where like a organization or website or...?

    For the local nic you should _always_ configure dns servers that have the same scope. I think 8.8.8.8 and 127.0.0.1 will never have the same scope. Note that the configuration of multiple dns servers is only there for failover purposes. If the first one
    is working, the second one is never used.
    You should create a zone on your dns server matching your domain, and you should request your registrar to make your server authorative over your zone. Some providers let you configure this yourself (on a weninterface), so please consult the documentation
    provided by the service provider/registrar. If in doubt, they will be the primary contact point as the required configuration depends on theirs.
    Note that when you want to host a public dns server, the server should be reachable from the internet on port 53 tcp/udp and you should follow guidelines for serrver security very strictly. 
    Also be aware updates on dns servers need some time to be applied worldwide due to caching that has to expire and zone transfers that might be needed. be patient.
    MCP/MCSA/MCTS/MCITP
    Thanks SenneVL for your nice answer .
    my server IP is static and reachable from Internet,then why when you add my server ip on your network adapter as a DNS it works and you can type mysite.com on your browser and see my site?
    you said "Also be aware updates on dns servers need some time to be applied worldwide due to caching that has to expire and zone transfers that might be needed. be patient."
    how long it takes?

  • How do you add DNS server to a VNET?

    I'm trying to create a VM to serve as a DNS server for my VNET, but when I attempt to create a new VM, I'm forced to select one of the subnets I created, which would render it inaccessible from all other subnets. How are you supposed to create a VM in
    an address space that would be accessible to all subnets in a VNET?

    Hi,
    You could try Reserving the internal IP address of the DNS server in your VNET and register it as a DNS server.
    To Register DNS Server, in the management portal Click on New -> Network Services -> Virtual Network -> Register DNS Server, as shown below.
    Then you should be able to assign it to the VNET.
    Additionally to reserve an IP Address for a VM you could refer: http://msdn.microsoft.com/en-us/library/azure/dn630228.aspx
    If you want to set a static IP address for a VM that you previously created, you can do so by using the following cmdlets:
    Get-AzureVM -ServiceName “Servicename” -Name “Vmname”  | Set-AzureSubnet –SubnetNames “Subnet” | Set-AzureStaticVNetIP -IPAddress 192.168.44.4| Update-AzureVM
    Regards,
    Malar.

  • How to prevent changing DNS server address

    I work for a public school district. We just purchased our first batch of Win 8.1 PCs, but they are not the Pro version, so there is no gpedit.  I want to prevent students from accessing the TCP/IPv4 Properties dialog box in order to ensure that the
    DNS server address is always obtained automatically.  Can anyone tell me how to do this using regedit, or any other way?  Thanks!

    Easiest way is to assign these students a standard user account (without admin rights).. They cant change any system setting then.. Other than restricting privileges I don't think you have option here since you don't have group policy editor ..
    There could be a possibility to do this using regedit But it is not recommended since there are no any official article for this other than below untested third party article form ehow
    http://www.ehow.com/how_8110801_disable-tcpip-properties-regedit.html
    Besides it could be tedious.. enabling and disabling it.. 

  • How do I find my server address, directory domain or MAC OS x server?

    I went into systerm preferences, then accounts, in Login Options it has Network Account Server (Join . .) when I hit Join it asks for my server address, directory domain or MAC OS X Server?  Are these all the same addresses?  Also how do I find mine?  Is it an IP address.  I just need a simple answer.
    FYI I'm on a wireless network on Airport Extreme.  I also have a MacBook Pro Lion 10.7.5 hooked up with this and my MAC. When I click on Network on the MacBook Pro Lion 10.7.5 Wi-Fi comes up instead of Airport Extreme.  Do I even need to join the Network Account Server in Account Preferences?  Thank you in advance if anyone can help me

    Do I even need to join the Network Account Server in Account Preferences?
    No. There is no network account server.

  • How to setup multi DNS server resolution

    I have a peculiar situation which I think may be applicable to others. I take my Macbook Pro to work. At work I have a Ethernet based LAN connection and a wireless connection.
    The ethernet connection gets me access to company servers, but uses some crude proxies and limits what I can access on the net.
    The wireless was setup by a tech to get around this and has a direct connection to the net, but no access to the company servers.
    The best situation I have currently is to put the wireless connection first in the network setting sand use that unless I need a company server. Then I have to turn wireless off before accessing the server and turn it back on to access anything I cannot get through the company LAN.
    I've been looking into configuring the Mac to enable me to have both on all the time. I've found that if I execute
    route add 161.117.0.0/16 -inteface en0
    Then any company server name I have already resolved will correctly route out through the eithernet rather than the wireless which solves the first part of the puzzle.
    I've also tried to setup multiple DNS resolution by adding a /etc/resolvers/company.com.au file with the contents:
    nameserver 161.117.219.153
    nameserver 161.117.248.113
    search company.com.au
    search_order 1
    I've then checked this with scutil --dns which shows
    DNS configuration
    resolver #1
      search domain[0] : Wireless
      nameserver[0] : 10.0.0.138
    resolver #9
      domain   : company.com.au
      search domain[0] : company.com.au
      nameserver[0] : 161.117.219.153
      nameserver[1] : 161.117.248.113
      order    : 1
    DNS configuration (for scoped queries)
    resolver #1
      search domain[0] : Wireless
      nameserver[0] : 10.0.0.138
      if_index : 5 (en1)
      flags    : Scoped
    resolver #2
      search domain[0] : company.com.au
      nameserver[0] : 161.117.219.153
      nameserver[1] : 161.117.248.113
      if_index : 4 (en0)
      flags    : Scoped
    But I still cannot get DNS resolution working for the company servers. Dig is no help because it's doco says that it only uses the /etc/resolv.conf file. Unfortunately documentation on setting up multi DNS resolution is practically nil and I've not been able to find any examples on the net. Just a few postings saying to use /etc/resolvers and very little doco in man pages.
    Has anyone else managed to get this working?

    Following blogposts will get you started:
    Automatic Provisioning of a Virtual BizTalk Environment
    http://blog.codit.eu/post/2013/06/07/Windows-Azure-IaaS-%E2%80%93-Automatic-provisioning-of-a-virtual-BizTalk-environment.aspx
    One Click BizTalk Multi Server Environment Azure Provisioning
    http://blog.brauwers.nl/2013/07/23/one-click-biztalk-multi-server-environment-azure-provisioning-and-full-configuration/
    Build an Azure IAAS Biztalk Single Server or Domain
    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2014/06/12/build-an-azure-iaas-biztalk-single-server-or-domain-win-100-or-other-great-prizes.aspx
    Glenn Colpaert - MCTS BizTalk Server - Blog : http://blog.codit.eu

  • How do I find my Server address?

    Hi I have recently downloaded BBM for iPhone and it's asking me for my server address, does anyone know where I can find this information? Thanks

    Do I even need to join the Network Account Server in Account Preferences?
    No. There is no network account server.

  • How do you find outgoing server information in mail 1.1.1 on OS10.1?

    My ISP tells me I need to verify my Outgoing SMTP is secure SSL. I know in Tiger you can access this by clicking the server settings button, but I need to do this for OS 10.1 and the only option that old version has is for the incoming under Account options. CLick on the link for a screenshot of what I have. I had no luck finding help topic about this
    any suggestions?
    [IMG]http://i107.photobucket.com/albums/m293/tcarter_02/Misc/options.jpg[/IMG]

    Maybe ctrl+F -> Search in the entire site -> Code view
    and search for example: style="the inline style;"
    That could be a solution...
    Cheers!

  • How do I find my "Server Settings" if they need to be changed?

    When I try to log in, I get this error message:
    "Unable to establish TLS connection to POP3 server. The server may be down or may be incorrectly configured. Please verify the correct configuration in the Server Settings for your mail server in the Account Settings window and try again."
    How do I get ot my "Account Settings Window" to verify the correct configuration in my server settings?

    In the left pane of TB, left click one time on the name of the account ([email protected]). Near the middle of the page which is displayed, click 'View settings for this account'. Click on the second line 'Server Settings'. You may also need to verify the 'Outgoing Server (SMTP)' settings. Check with your Internet Service Provider if you have questions about the correct values.

  • How to dynamically find the dependent jar files on user's PC

    I've written an application to deal with JTAPI. Unfortunately the implementations by vendors are different in terms of file names. Ideally I'd like to load jars based upon what's installed, e.g. load jtapi.jar when Cisco is installed, or Escjtapia.jar when it's Avaya. The application uses a small subset of JTAPI so different implementations should not yield any different results.
    I edited the manifest file in my jar so that the Class-path has both jar file names for Cisco and Avaya. I didn't enter any path, hoping the CLASSPATH of Windows would be searched, but it is not the case. Also, if other vendors are supported in the future, I might have to add all different file names in the manifest. I don't think the class loader will work in my case, as I may not know the class name at all. I just want to search the system's classpath the find any jar complys to JTAPI and load it.
    Anybody can give suggestions on deployment? Thanks!

    I found it. EXIT_SAPLV01Z_001 does the trick. A package contains many User-Exits, BADIs and enhancement points, so it took me a while to go thru all of them.

  • How do I find dns address for a hp wireless printer software installation?

    Tried to enter address for wireless modem, no go.  Tried to enter address for HP printer, no go.  what do I try next?

    Hello, Router IP should be the DNS to use, but did you set the IP on the Printer to the same IP range as the Router uses?
    http://www.hp.com/global/us/en/wireless/faq.html

  • I deleted my SMTP server - How do I find it?

    I was having difficulties in sending emails - I was getting the error message:
    Cannot send message using the server smtp.xxxxxx
    In a moment of madness when trying to fix this - I went into the mail preferences and deleted this server.
    How do I get it back? How can I find the server?
    If it helps - I use my me.com email with my mac.
    thanks
    (yes I do feel stupid)

    The Mobile Me outgoing mail setup is:
    Outgoing Mail Server: smtp.me.com (for either me.com or mac.com addresses)
    Server port: 587 or 25 (some ISPs may block port 25)
    "Use Secure Sockets Layer (SSL)" should be checked (enabled)
    Authentication: Password
    User Name: Your MobileMe member name (without "@me.com" or "@mac.com")
    Password: Your MobileMe password

  • How to find SMTP server name on AIX 5.3 ?

    Hi All/Guru
    how can i find SMTP Server name on my aix server which i need to configure E-mail notification for database alerts.
    Thanks in advance.
    Tina

    Check in the file /etc/sendmail.cf

  • How can i find SDM port , Message server port, Message server name?

    Hi All,
       I am tring to deploy a ear file from NWDS.
    I am trying to congigure through
      Windows>Preferences>SAP J2EE engine -- Remote.
    I have these questions.
    1. How can i find Message server Host?
    2. How can i find Message server Port?
    3. How can i find SDM port?
    4. What is the difference betweent the Message server port and SDM port? Both are same or can be different?
    5. What are the ways to deploy a ear file on remote J2EE engine ?
    6.Can I run SDM from a remote mechine and connect to the server?
    7. When i am trying to deploy a ear file i am getting
      "Cannot determine sdm host (is empty)" what is the possible reason.
    (Here i used information from /usr/sap/GXI/DVEBMGS00/j2ee/cluster/instance.properties for server host and port number)
    Thank you
    Ganges Leaves

    Hi Ganges~
    Please check this link~
    Deployment Problem
    Could not start SDM Server
    SDM setting the target system for j2ee engine
    "No route to host" - SDM
    SDM Error
    Can not deploy. sdm host is empty
    Hope this helps,
    regards,
    moorthy

Maybe you are looking for