BackupPC-users

Re: [BackupPC-users] BackupPC finds the wrong hosts with DNS hijacking ISPs

2013-09-05 01:06:48
Subject: Re: [BackupPC-users] BackupPC finds the wrong hosts with DNS hijacking ISPs
From: George Adams <g_adams27 AT hotmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 5 Sep 2013 01:05:24 -0400
> George, 
>  
> Now that's annoying.  Thanks for figuring out the problem. 
>  
> Are your local PC client IP addresses fixed/known?  If so, you should  
> be able to set $Conf{ClientNameAlias} to the IP address, and the code  
> should do the right thing (even though DNS will still  
> return 66.152.109.110, it should use $Conf{ClientNameAlias} to contact  
> the client).

Thank you for the reply and the suggestion, Craig.  While the hosts addresses 
are static, each one has two addresses such as 10.4.9.3 (wired) and 10.4.9.103 
(wireless).  nmblookup is definitely helpful in finding which address is 
active, since only one interface is active at a time.

This probably isn't a good solution for anyone else, but I ended up just 
removing the gethostbyname() lookups in the code to force nmblookups all the 
time.  Maybe if DNS hijacking becomes a bigger problem you may want to consider 
making it a configurable option?

Thanks again.

--- BackupPC_dump.dist  2013-08-02 00:21:34.785716672 -0400
+++ BackupPC_dump   2013-09-05 01:00:51.248633596 -0400
@@ -493,7 +493,7 @@
     } else {
         $host = $client;
     }
-    if ( !defined(gethostbyname($host)) ) {
+    if ( 1 ) {
         #
         # Ok, NS doesn't know about it.  Maybe it is a NetBios name
         # instead.


--- BackupPC_restore.dist       2013-08-02 00:21:34.789716861 -0400
+++ BackupPC_restore   2013-09-05 01:00:51.652631419 -0400
@@ -167,7 +167,7 @@
 # Find its IP address
 #
 if ( $hostIP !~ /\d+\.\d+\.\d+\.\d+/ ) {
-    if ( !defined(gethostbyname($host)) ) {
+    if ( 1 ) {
        #
        # Ok, NS doesn't know about it.  Maybe it is a NetBios name
        # instead.                                        
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/