BackupPC-users

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

2013-09-06 13:44:32
Subject: Re: [BackupPC-users] BackupPC finds the wrong hosts with DNS hijacking ISPs
From: Holger Parplies <wbppc AT parplies DOT de>
To: George Adams <g_adams27 AT hotmail DOT com>
Date: Fri, 6 Sep 2013 19:21:11 +0200
Hi,

George Adams wrote on 2013-09-05 01:05:24 -0400 [Re: [BackupPC-users] BackupPC 
finds the wrong hosts with DNS hijacking ISPs]:
> [Craig wrote:]
> > 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).

just to state it explicitly: the problem is not a missing feature in BackupPC,
it's a broken DNS setup. DNS is a very basic part of IP networking, and a
broken DNS setup will basically bother you everywhere. Rather than working
around the problem in every single application, it may be worth fixing the DNS
setup (which is basically also what was suggested by Raman Gupta).

Don't get me wrong, it's not your fault. Your provider is doing something
stupid, not you, and it's not the first time this is happening, and you're not
the only one it is bothering.

If you are running dnsmasq, for instance, you can add a configuration
directive like 'bogus-nxdomain=66.152.109.110' to turn these bogus responses
back into the NXDOMAIN they should have been in the first place. For other DNS
caches/proxies/servers, there may well be similar options.

If you are not running a DNS server, you may or may not want to consider
setting one up. dnsmasq is rather easy to set up, and it's rather harmless: as
long as you don't point an /etc/resolv.conf at it, it won't be used, so you
can test with dig/host/... until you are satisfied it is doing just what you
want, before you either deinstall it again or point one or more hosts at it.

Switching to a different DNS forwarder (as suggested before) might be easier,
provided you *can* override the settings obtained from your provider.

> 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.

Potentially, DNS resolution of the host name to *both* addresses should also
work (at the cost of requiring a timeout before the second address is tried),
but I'm not sure the PingCmd will handle that gracefully ... (and it probably
can't be done with ClientNameAlias).

> 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?

If anything, I'd suggest adding something like $Conf{ResolvCmd} (which should
default to calling an internal BackupPC Perl subroutine for efficiency), so
you could implement virtually any kind of name resolution you can imagine,
though I honestly don't see much need for it.

Regards,
Holger

------------------------------------------------------------------------------
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/

<Prev in Thread] Current Thread [Next in Thread>