python socket dns query will get the correct result while the dig will not.
On Wed, Oct 2, 2019 at 4:41 PM Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
> On Wed, 02 Oct 2019 16:28:40 +1000, Chris Angelico wrote:
> > When you ask dig, you are always asking for a DNS lookup. But
> > gethostbyname does a lot of other things too.
> What other things, could you please give more detailed hints?
Start with /etc/nsswitch.conf and see how far down the rabbit hole you
want to go...
> > My guess is that your
> > /etc/hosts has an entry for that domain.
> > It's also possible that your
> > DNS resolver is misconfigured, especially since the authoritative
> > servers for that domain disagree with your dig results.
> As you can see, I use the public dns servers for the dig, and I cannot do
> any config on these dns resolvers.
Actually I'm not sure that you are, since you're getting completely
different results to mine. It's possible you have something
intercepting your DNS requests.
Hmm. The first IP you posted (which purportedly came back from
188.8.131.52) belongs to Facebook. That's pretty suspicious.