Thursday, March 28, 2019

I have had IPv6 for a while via HE.net, but last year BT got around to enabling IPv6 on my broadband (they also sneakily kept putting the price up).
In the search for value I switched to PlusNet (Which! recomended for customer service in the past). Unfortunately PlusNet don't give you IPv6 (historically they have been pretty shit about moving with the times, and in the case of IPv6 they have gone backwards).
I connected my He.Net IPv6 tunnel back up to my router (LEDE if you're interested on BT Home Hub 5, so I have control of the DNS).
Around that time I also got a free netflix subscription and Microsoft (who I work for: disclaimer) also started offering reward points for searches.
Netflix just didn't work; I searched for why and found people had already fixed the issue in a few different ways, but then I realised that my Bing searches kept returning distinctly US looking results (especially the opening page of Bing), and more recently I stopped getting points for the quizes and the searches.
Some quick Wireshark tracing showed that Azure traffic manager was directing my IPv6 http connection towards US Bing not UK Bing.
Here is my fix, set dnsmasq on the router to blackhole AAAA (ipv6 address queries) for Bing (like we do for Netflix. It took a bit of investigation but this seeems to work for me:

# Null AAAA response
server=/bing.com/#
address=/bing.com/::
server=/trafficmanager.net/#
address=/trafficmanager.net/::

server=/a-msedge.net/#
address=/a-msedge.ne
t/::


The lines ending with hashes tell dnsmasq to look up these records itself rather than returning a forward, and those ending :: return a duff IPv6 record for the domain triggering the router to do IPv4 lookup. This does put dns load on the router, but it doesn't seem to mind too much :D