Connector modifying HOSTS file with wrong IP address RRS feed

  • Question

  • I have 5 computers on my network at home connecting to the WHS. I run hamachi VPN on one computer and the server to help with supporting my family while I am on the road.

    What I am finding is that the one computer that I have hamachi installed on is having its hosts file modified by the connector for the server address to reflect the hamachi IP vs. the real IP on the local LAN. What this does is forces the server network traffic down the VPN to the WHS using the VPN which puts a kink in my network connection performance when backups and large copies are done.

    I haven't figured out exactly when this change is being made but for example I will make the change back to the local address. Drive to work and the address will be the VPN IP not the LAN IP. I have tried to write protect the hosts file and still a new copy is made and the servers host name is remapped to the VPN IP address.

    So my question is what mechanism is doing this...I assume its the connector since the comment on the hosts file entry is:

    5.x.x.x ourserver #Windows Home Server#

    Is there a way to override this from happening and force the connector to keep the LAN address over the VPN address?


    Wednesday, March 17, 2010 10:37 PM

All replies

  • This occurs as a result of enhancements added in Power Pack 3 to allow the use of OpenDNS, which otherwise tends to interfere with Windows Home Server backup and restore, and sometimes connector installation or functioning. As far as I can tell, there's no way to disable this functionality.
    I'm not on the WHS team, I just post a lot. :)
    Thursday, March 18, 2010 1:31 AM
  • Will it overwrite a hosts entry that you manually put in?

    Thursday, March 18, 2010 10:34 AM
  • Yes it will overwrite any entry I put in.  I  even added a record above this record with the exact same host name and the LAN IP.  Within 2 hours a new host file was written with  that record removed.

    Thursday, March 18, 2010 2:54 PM
  • All I can really say is that this behavior is by design and intended to fix an issue that more and more users will encounter. ISPs who have outsourced DNS to providers like OpenDNS will cause exactly the same sorts of issues that configuring your router to use OpenDNS would cause; do a search on OpenDNS in these forums to find out more about those problems. 

    My recommendation is that you submit a bug report on Connect, since it seems like there might be some adjustment that could be made. I don't know what Microsoft will do with a bug report (configuring a VPN connection to your server is unsupported), but there's little that you can do to change this behavior. My first suggestion for you would be to not leave your Hamachi connection running at home. Failing that, you could try setting the priority for your network connections so that your wired connection has a higher priority than your Hamachi connection. I don't guarantee that will help, though. (I doubt it will, actually; as soon as you leave your home you'll probably wind up with the problematic entry in your HOSTS file.) To change the priority of network connections, see e.g. this KB article (for XP; the process is similar for Vista/Windows 7).

    I'm not on the WHS team, I just post a lot. :)
    Thursday, March 18, 2010 3:54 PM
  • I'm experiencing the identical problem.  WHS with PP3, OpenDNS and Hamachi.  Host file keeps switching back to the VPN IP address even after I manually set the SERVER entry back to my local LAN address.  I understand what's happending but don't fully understand why.  Thanks.
    Thursday, March 18, 2010 4:57 PM
  • An idea would be to attempt removing or even denieing  write permissions for the hosts file in its properties on the Security tab for all accounts including SYSTEM after you have adjusted the content as you need it.
    Depending from the client OS this may require disable UAC temporary or do it from command line started as Administrator using the icacls command (Vista or 7)
    No idea, if any side effects would happen.
    Best greetings from Germany
    Thursday, March 18, 2010 7:29 PM
  • Tried the network priority idea before I posted here.  My LAN connection is first on list and the Hamachi is last.  So scrach that one off the list.  

    I really don't want to keep turning off the Hamchi and forgetting to turn it on before I leave town and then I am out of luck with remote connections. 
    Thursday, March 18, 2010 10:10 PM
  • I didn't actually think changing connection priority would work.

    I don't use Hamachi personally (I have a VPN solution built into my router) but in general all VPNS work the same way. You have a server, which clients connect to, and you have one or more clients. If you shut down the server side, no client can connect, but if you shut down the client side, that client can reconnect later. The problem you're experiencing is on the client, not the server, so there's no need to shut down the server side of the connection...

    I'm not on the WHS team, I just post a lot. :)
    Friday, March 19, 2010 3:19 AM
  • Thanks Ken and Olaf,

    I made the persmissions change to the hosts file that administator and system can only read the file and and it seemed to last over night. I'll be checking on it all day from work since this is the usual pattern of when the hosts file tends to change.

    Friday, March 19, 2010 1:00 PM
  • ...
    I'll be checking on it all day from work since this is the usual pattern of when the hosts file tends to change.

    That would make sense, since presumably you don't have access to your home network from your office. :)

    I still think you'd probably be better off seeing if you can manage to do without Hamachi; there are a range of other options available, including the Windows Home Server Remote Access web site (console access, direct Remote Desktop access to supported operating systems) and Remote Assistance (shared remote desktop access to any version of Windows).

    Note: If you're using Hamachi to get around corporate firewall restrictions (i.e. you can't use Remote Desktop/Assistance/etc. from the office), I have to advise you to stop now, as you're risking your job. Those restrictions are there for a reason; whether you agree with the reason or not they are part of your terms of employment...

    I'm not on the WHS team, I just post a lot. :)
    Friday, March 19, 2010 2:24 PM
  • Well not even the security settings directory on the file keeps this process from happening.  When I checked the hosts file late in the day Friday the security of the file was back to "inherit" from directory and the VPN IP address was back in the file.

    My only solution is to write a VBscript that detects the change and then puts my value back in again.


    Sunday, March 21, 2010 2:42 PM