Remix.run Logo
▲ So my ISP was hijacking my DNS(karthihegde.dev)
97 points by frostbyte7 a day ago | 67 comments
▲simonjgreen 4 hours ago | parent | next [-]

Noting this article skips over any discussion about why, or potentially (in the eyes of the law at least) legitimate reason an ISP might do this.

Many ISPs in many countries are forced to do this for certain enforcement action that gets put upon them by their respective states for things such as age gating, censorship, monitoring, it varies state by state.

And to be clear this is in no way an endorsement of the practice, and I am confident no ISP WANTS to do this.

I am speaking here as the owner of a UK ISP (who does not currently do this).

▲Geezus_42 an hour ago | parent | next [-]

I'm pretty confident ISPs do want hijack DNS since they've been doing it for decades in order to push ads to their customers.

▲gruez an hour ago | parent [-]

Examples?

▲dspillett an hour ago | parent | next [-]

There were certainly a number of ISPs in the UK that tested ways to inject ads in content in the 2000s, there was quite a hoo-hah about it in some forums. That was usually by modifying HTML content in transit via transparent proxies though, not DNS poisoning, but it shows that the intent exist{ed|s}. This is one of the reasons that HTTPS-everywhere is a good idea even if you aren't concerned about snooping in general.

▲robjan 18 minutes ago | parent [-]

An example I remember is when Virgin Media replaced any DNS queries returning NXDOMAIN with their own "search page" plastered with ads.

https://shkspr.mobi/blog/2021/03/advanced-network-error-sear...

▲dspillett a minute ago | parent [-]

Ah, yes, I forgot the NXDOMAIN hijacking.

▲mafuy an hour ago | parent | prev [-]

Deutsche Telekom (largest ISP in Germany) did this, not sure if they still do or were ordered to stop by court yet

▲saidnooneever an hour ago | parent | prev | next [-]

this is valid, in NL most DNS is also heavy monitored and intercepted to do blocks if mandated etc. if you want to get around it u can tunnel ur tlsdns thingy to another place and they essentially cannot intercept it, they can still block the IPs it resolves to so its hit and miss depending on how the other end is implemented.

its usually not nefarious, that is just the simpelest (and usually, not always) wrong explanation.

people who think this is not normal probarbly didnt experience what kind of shit u could find on the pre google pre monitored internet. for sure shit u do not want your kids to find. if u dont understand, then likely u dont have kids and very weird fetishes...

▲witnessme 4 hours ago | parent | prev [-]

Why do you assume the others have same ethical compass as you? I hope everyone has the same compass but we have seen again and again trust being broken.

▲gib444 29 minutes ago | parent [-]

This is a complete non sequitur

▲jwrallie 5 hours ago | parent | prev | next [-]

My workplace is messing with DNS as well, probably to filter specific websites, and I would not mind it since for the context of my usage that is perfectly fair.

But their DNS responses have latency spikes every couple of minutes of 1-2 seconds that was driving me crazy. I simply enabled DNS over HTTPS in Firefox and everything feels so smooth now.

I have no idea how my coworkers seem to be so insensitive to it.

▲pbhjpbhj 2 hours ago | parent | next [-]

Enabling DoH on a locked down workplace network sounds like a way to get fired.

But I guess that if they let you do it they're probably not competent enough to catch you.

▲pjc50 an hour ago | parent | prev [-]

They might be proxying all your traffic through a "WAF". I've noticed that even quite a lot of regular websites linked on HN on "non standard" domains are simply unresolvable on my work network.

▲Terr_ 6 hours ago | parent | prev | next [-]

I fear a future where pretty much everything is trying to hack you or doing something which is indistinguishable from the meddling of a hostile actor.

I suppose the answer is politics rather than technology: Get enough people together to make a rule against it, and at least it will become niche.

▲Yevini an hour ago | parent [-]

I'm not sure regulation alone would solve it. Depending on the country, governments themselves sometimes require ISPs to interfere with DNS

▲pjc50 an hour ago | parent [-]

That is regulation! You do actually have to win the argument for liberalism in public if you don't want your fellow citizens to keep trying to stop you doing this.

▲daitangio 4 hours ago | parent | prev | next [-]

Telecom Italia locks my DNS server (I cannot change it).

I ended up using PIHole as DHCP, to drive home devices to PIHole, and control my privacy.

The trick is simple: disable DHCP on your router, and activate it on PIHole. As a bonus, PIHole on my RasperryPI2 is way faster than the little chip on my provider Router, and can be patched automatically with unattended upgrades.

▲noselasd 2 hours ago | parent | next [-]

Note that there are ISPs that actively hijack traffic to UDP port 53 further inside their network and transparently maps that onto their internal DNS servers.

▲jachee 2 hours ago | parent [-]

This is why you would want to setup DNS-over-TLS or DNS-over-HTTPS to, say, 1.1.1.1. They can’t hijack DNS traffic that looks like HTTPS traffic.

▲someguyornotidk 3 hours ago | parent | prev | next [-]

And if you can't disable DHCP or set the router in bridge mode, you can just add another router (that you control) between your ISP device and the rest of your network. I've been running this setup for over a decade and didn't run into any noteworthy issues. Leave the ISP-infested router outside your network.

▲a-french-anon 37 minutes ago | parent | prev [-]

Pretty sure that you can use DHCP and still override the DNS servers with most DHCP clients.

▲jfyi 4 hours ago | parent | prev | next [-]

Hardly a new thing.

Oh and btw, it's not "DNS Hijacking" it's a "Domain Helper", see: https://feross.org/shame-on-you-comcast/

▲itopaloglu83 an hour ago | parent | prev | next [-]

I’m using NextDNS over https and frequently experience connection freezes with both Spectrum and T-Mobile. I don’t know what they’re trying to do, but I’m not happy with the way they’re trying to block basic services.

▲eqvinox 9 hours ago | parent | prev | next [-]

The point of running a local unbound is indeed to turn on DNSsec validation. After that, it's the domains' fault for not using DNSsec. But at least your own stuff won't be tampered with, because you use DNSsec on your own domains, right? Right?

:-(

Coincidentally, a bunch of free wifi stuff blocks the root key queries unbound does at startup, resulting in nothing working until you get those records in there somehow (e.g. load_cache).

▲yjftsjthsd-h 5 hours ago | parent | next [-]

I was under the impression that dnssec's entire value was rather controversial? I'm not a crypographer so I had to skim https://sockpuppet.org/blog/2015/01/15/against-dnssec/ and I still don't understand it, but if

> In fact, it does nothing for any of the “last mile” of DNS lookups: the link between software and DNS servers. It’s a server-to-server protocol.

is true, then I'm ... pretty unsold on its usefulness. Anyone wanna ELI5 whether that's untrue or anything's changed in the last decade?

▲jeroenhd 2 hours ago | parent | next [-]

DNSSEC as designed is pretty useless. It was designed in an era where computers could not be relied upon to do cryptographic validation of something like DNS records, so that duty was delegated to DNS servers like the ones ISPs ran, where records could be cached.

There are also potential downsides (like someone being able to enumerate your subdomains, if you care about such a thing) and it's often switched off by default on operating systems consumers use.

However, it's the only thing that validates DNS records at this moment. That alone makes it worth enabling, in my opinion. For many domain owners, you only need to tick the checkbox in your registrar's domain control pane. If you use a modern DNS server, it's also one config flag and maybe copy/pasting a handful of fields away.

I'll gladly turn off DNSSEC the moment we come up with something better. DoT/DoH doesn't solve the same problem and no real solutions seem to have been proposed. That said, modernisation efforts are still being done. Smaller keys and modern cryptography rather than the massive RSA ones for instance.

▲usr1106 5 hours ago | parent | prev | next [-]

I can't speak about the strength or weaknesses of the whole concept.

Out of curiosity I enabled DNSSEC checking beginning this year. I mostly noted nothing in my browsing. However, with 2 services I noted obscure problems that worked only partially. Some Jira plugins and Swedish railway SJ. I needed to excempt some of their domains from being checked to use their services. Of course you waste a couple of hours every time it happens because you don't think of DNSEC first when some web-based services behaves weirdly. There might be more requests not served to my browser, but I just never noticed or bothered to debug.

So not fit for general use. And even as an experienced developer it's not easy to understand why an exception would be needed. A bug in systemd? Incorrect data in DNS? A real attack?

Edit: I don't use standard DNS on port 53 at all. Blocked outgoing requests on that port. Everything DoH or DoT. Of course I need to trust those endpoints at least in repect to confidentiality. And most domains are unsigned. At least for those unsigned ones I need to just trust also in respect to integrity.

▲jeroenhd 4 hours ago | parent [-]

DNSSEC failures need to be louder. If websites that fucked up their DNSSEC would get the same error messages as websites that fucked up other parts of their security, people wouldn't be so eager to turn off security festures as workarounds.

Give SJ the option to turn off DNSSEC and their website will stay broken. Give people a "someone might be tampering with your connection" popup and they would start caring.

There are also other issues with DNSSEC that need working out, but I still believe it does much more good than it does bad. Leaving everything in the background with an easy-to-disable setting makes it next to useless.

▲eqvinox an hour ago | parent | prev [-]

Note the linked post is from 2015. But also:

> domain-validated certificates remain insecure

...99% of the internet runs on DV certificates; that's what ACME & Let's Encrypt are at the end of the day.

(You might also note I didn't actually speak in favor of DNSsec, I'm just arguing that running unbound locally without having DNSsec validation enabled isn't particularly useful. I am, generally, in favor of rolling out DNSsec, but it certainly has its problems. It doesn't help against ISP tampering on unsecured domains, for example. DoT and DoH are better against that, if [and only if] you have a trustworthy cache to point them at.)

▲denkmoon 5 hours ago | parent | prev [-]

DNSSEC adoption rate means that this would be insufficient to detect (let alone prevent) that type of tampering for most domains. The correct solution is identified the the first paragraph of the post, which is to use a tamper resistant transport to the dns server (eg DoT, or DoH if you like everything being wrapped in http)

▲AceJohnny2 6 hours ago | parent | prev | next [-]

Which ISP was doing this? It's worth calling out the bad actors.

▲drewfax 5 hours ago | parent | next [-]

It's pretty much most Indian ISPs and in this case it was ACT Fibernet.

▲dylan604 5 hours ago | parent | prev | next [-]

Wouldn't the list of ISPs not doing this be easier to make?

▲AceJohnny2 5 hours ago | parent | next [-]

No.

There's a difference between what you're likely referring to, where the ISP's own DNS, which most people are using by default, returning particular results, and what the author is showing here where the ISP is actively tampering with outside DNS responses to insert incorrect responses.

Until now, I was not aware of any ISP doing the latter.

▲jeroenhd 2 hours ago | parent | prev [-]

Only one ISP I've used ever did this (VodafoneZiggo) and that was over a decade ago, and only to redirect domains that couldn't be found to ad-filled "search" pages.

It's not universal, the occurance or this type of abuse seems to vary wildly from country to country

▲justauserid 2 hours ago | parent | prev [-]

Want to ISP-less in India? :D At least ACT doesn't blanet throttle/fail uplaods of any sort like Jio does on its 5G – even LLM calls fail.

▲mgoetzke 2 hours ago | parent | prev | next [-]

Deutsche Telekom did that too on my DSL line once, took some arguing to them suddenly 'do nothing' but it suddenly 'worked'

▲aand16 5 hours ago | parent | prev | next [-]

How is this not illegal... isn't what the ISP doing "hacking"?

▲figmert 3 hours ago | parent | next [-]

Illegal, where exactly? In various western countries ISPs are by law required to block some websites. In other countries, ISPs ar eby law required to have escape hatches to be able to shut down the internet. In yet others, everything runs behind a firewall. Take your pick, I guess?

▲noselasd 2 hours ago | parent | prev | next [-]

Very few, if any, countries makes this illegal.

Some countries have laws around Net Neutrality or Open Internet that can protect you from this, but even those countries have other legislations that can superseed that in specific cases. (e.g. hijacking DNS can be completely legal for some child protection laws, or to uphold laws that makes some web sites illegal)

▲throwawayffffas 3 hours ago | parent | prev [-]

The hijack is probably legally mandated. The site he was trying to reach is a torrent site.

▲arcfour 5 hours ago | parent | prev | next [-]

> Although your regular internet traffic is encrypted with TLS, your ISP can see the hostname during the TLS handshake (SNI).

https://support.mozilla.org/en-US/kb/understand-encrypted-cl... not anymore, with many (not all) sites.

▲gib444 4 hours ago | parent [-]

Very few of the top 10k sites support ECH

https://divested.dev/misc/ech.txt

▲amstan 5 hours ago | parent | prev | next [-]

Reminds me of the Xfinity "Your personalized WiFi summary" emails. Despite returning their router, using a third party almost-layer-2 modem, my own openwrt router (with its own wifi, thank you very much), their emails seem spooky.

They have a counter of all of my devices, somehow (i mean... i guess their count is wrong, but it's infuriating that they try to keep track).

▲gruez an hour ago | parent [-]

All of that could be done without "ISP was hijacking my DNS". DPI/SNI sniffing is more accurate and allows you to get more detailed statistics (eg. "20% of your bandwidth goes to youtube"

▲Sha1rholder 5 hours ago | parent | prev | next [-]

Sounds familiar to a Chinese

▲mariofdistrust a day ago | parent | prev | next [-]

my mobile network carrier blocks quad9

▲Tepix 4 hours ago | parent | prev | next [-]

Why not start by

1. contact the ISP and ask wtf they are doing

2. switch ISPs

▲esskay 4 hours ago | parent [-]

How do you think that conversation will go? You phone them, get put through to the call center and surprise surprise its not covered by their script.

▲asdff 3 hours ago | parent | next [-]

Switching too is funny. You are at the mercy of what isp ran a line to you. Starlink will fully cooperate with government too. They are a military contractor after all and also at the mercy of musk deciding dumb stuff.

▲mgoetzke 2 hours ago | parent | prev [-]

well after going down a few levels of tech support you do get to someone that 'does nothing' while it the magically works

▲bradknowles 5 hours ago | parent | prev | next [-]

Another reason to use a VPN you can trust, across your entire network and at all times.

▲asdff 3 hours ago | parent | next [-]

But the isp sits between that no?

▲throwawayffffas 3 hours ago | parent [-]

All traffic to the VPN is encrypted, including DNS queries.

All your ISP can tell is you are using a VPN.

▲asdff an hour ago | parent [-]

What about TLS inspection?

▲pjc50 an hour ago | parent [-]

What about it? Unless they've hijacked your local cert store somehow (which corporate machines do), they can't see inside the TLS. They can detect that you're connecting to somewhere and probably infer that it's some VPN, but only the most repressive countries actually block VPNs altogether.

▲ozim 5 hours ago | parent | prev [-]

So a VPN you set up and run yourself.

▲asdff 3 hours ago | parent [-]

Isn’t that the same as no vpn with extra steps? You are tunneling traffic from a computer you own to a computer you also still own. Third party vpn the whole point is I don’t run it.

▲khafra 3 hours ago | parent [-]

If you set up a VPN endpoint on a Hetzner box, you're trusting Hetzner not to MITM your DNS queries. They're likely more trustworthy than your local ISP (although that leaves you more identifiable to folks running the servers or snooping on server-side traffic, and Cloudflare will hate you). That threat model tradeoff is good for many people.

▲throwawayffffas 3 hours ago | parent | next [-]

Given the OP use case, you are going to get a letter from Hetzner at some point.

▲dspillett 5 minutes ago | parent | next [-]

Not if they are only using it to route the DNS traffic (though in that case a cheaper VPS might be better), which will work if the ISP is only poisoning DNS replies and not (which is often the case) blocking traffic to the target servers entirely.

The problem with this is you are adding a moving part to your DNS lookups. It might be worth adding two on separate VPS hosts and have your resolver fall back to the second if the first goes down.

Another, usually more minor, problem is that some services (like CDNs) use the source of your DNS query to modify the response so you get sent to a topologically near-by end-point. This means you might notice such services being slower as you are sent to a PoP near your VPN host not one closer to your actual location.

▲ozim 21 minutes ago | parent | prev [-]

Oh well OP was doing shady stuff ... then yeah they should continue with using VPN provider. VPN providers are shady AF, I don't think there is VPN provider I would trust more than my local internet provider.

▲asdff 3 hours ago | parent | prev [-]

Well that wouldn’t be running your own vpn. Hetzner is. They’d let you do this? Seedbox is against their tos hard to imagine they’d be a good choice to run a vpn for your linux isos.

▲konart an hour ago | parent [-]

> They’d let you do this?

Can't speak for Hetzner, but considering VPN use in Russia and China - I'd imagine most EU\US vps providers have someone's 3x-ui, remnawave or naked v2ray installed.

Plus - how are they going to detect your remnawave node sitting on 443 port? For them it's just some traffict.

And if you are worried about the amount (torrents) - you don't really need to torrent though them. You just need an access to a torrect tracker to get your magnet link and meta info.

Most default configs for 'ray have torrents locks for this very reason - you communicate with other people (seeds\peers) directly.

▲gruez 40 minutes ago | parent [-]

>Plus - how are they going to detect your remnawave node sitting on 443 port? For them it's just some traffict.

What about all the outgoing traffic? That's going to be hard to mask unless you have another VPN for outbound

▲netsharc 3 hours ago | parent | prev | next [-]

Yum, screenshots of terminal windows, which is just text...

Edit: oh wait, it finally loaded, 3x3MB images of text with scenery in the background!

▲z3t4 4 hours ago | parent | prev [-]

The story ended before it even started... What are the machine with the wrong IP doing? Is it just forwarding the request, or what is happening?