News for hackers. Stuff that matters.
Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @10:45AM (#25346727)
The biggest and most consistent downside I see with these DNS enhancements is that it prevents filtering at the network level. Querying nameservers is being pushed into applications themselves to support these new features (such as Chrome and Firefox), which bypasses any system resolvers configured on the host. In most cases there is no way to signal from the network that it is not desirable to do this (Firefox being the sole exception). There also is no good way for enterprises to centrally manage these settings. DNS is a major source of information when doing threat hunting on a network and having that go dark is a big problem.

Enterprises aside, there has been a rise of people using solutions like pi-hole in their home networks to filter out traffic not just for ads, but known malicious domains, and telemetry trackers (which Apple does get filtered by, only calling them out specifically because they have an active interest in not being filtered like this).

Yes I think it's also a problem that ISPs are snooping and selling this information, but I think that is a less severe problem than rampant malware infections and the excessive collection of online usage data in the telemetry systems present in every webapp, OS, mobile, or IoT device. This increases privacy in one place, while making it much harder to actively protect yourself from the more aggressive and invasive sources of data collection.

Re:Improving DNS Privacy with Oblivious DoH by stevepike on Tuesday December 08, 2020 @11:21AM (#25347307)
As someone who recently set up a pihole, I was shocked that it was possible to redirect all DNS requests on the network (in plain text!) to the pi. I did the method where you set up a network firewall at the router level that redirects all port 53 traffic to the pi. It's a nice feature for getting my xbox filtered, but it really felt like an insecure historical quirk rather than a feature we should be praising.

Surely it's progress for devices to be able to securely access name servers? I can't snoop on the network traffic going over https but somehow I can get a list of all names queried?

Re:Improving DNS Privacy with Oblivious DoH by xg15 on Tuesday December 08, 2020 @06:32PM (#25353077)
If I get access to those devices, yeah, sure. But in practice, I'd argue this actually reduces privacy for users, as it gives apps and devices a secure path through the network which cannot be monitored by any intermediary - including the user of the app or the owner of the device themselves. So no chance to find out what kind of data is being transmitted there either.

To me, DoH seems less about protecting the user from attackers and more about protecting apps and devices from the user.

Re:Improving DNS Privacy with Oblivious DoH by Spivak on Tuesday December 08, 2020 @08:37PM (#25354286)
I think your point is 100% correct but surely you understand that this applies to HTTPS too. Network filtering would be so much more powerful if my pihole could modify and block HTTP requests in-flight.
Re:Improving DNS Privacy with Oblivious DoH by heroprotagonist on Wednesday December 09, 2020 @05:24AM (#25357172)
One way to limit this would be to add IP resolved through an approved resolver to a temporarily allowlist for a firewall. The firewall would default-deny outbound network requests. Allowlisted IP would be permitted, but be removed from the list after the TTL for the DNS request expires.

Of course, you'd have to add in some permanent exceptions once you realize just how much hardware and software implodes as a result of this.

Some expected, like peer-to-peer applications, though those allow you to define an outbound ephemeral port range you can limit them to (except perhaps for some poor implementations in commercial game launchers trying to offload bandwidth costs). So some are fairly easy to define.

Others you'll have to log and see. Like your Google Home hardware..

I got some minis and disabled the mics since they had hardware switches. I hacked around a bit emulate sending them audio programmatically and discovered they use external DNS and therefore couldn't resolve the local network web server hosting the audio clips I wanted to play. So I had to permanent-lease the hostname's IP and give it an IP address.. They were already bypassing local DNS blockers years ago.

Re:Improving DNS Privacy with Oblivious DoH by buran77 on Wednesday December 09, 2020 @06:34AM (#25357571)
> add IP resolved through an approved resolver to a temporarily allowlist for a firewall

That ship has sailed now that some of the functionality provided by TCP moved up to HTTPS. Whereas in the past you could expect the same IP to expose DNS on port 53, FTP on port 21, or HTTP on port 80, now the same IP will serve you everything over the handy port 443.

So a software developer can very well go this route if they want to obfuscate DNS calls and you wouldn't be able to discriminate the traffic like you would today with ports.

Any global (OS/network) policies become meaningless if your browser or app decide to only ask the DoH resolver "who is google.com" or "who is facebook.com" once, and have all subsequent queries go that way inside an encrypted HTTPS stream.

Re:Improving DNS Privacy with Oblivious DoH by Lammy on Tuesday December 08, 2020 @10:00PM (#25354813)
> cannot be monitored by any intermediary

Key word is any single intermediary. The announcement even explicitly says "no single entity can see both at the same time".

I wonder what it would be like if there were multiple entities in cooperation, each sharing their component of your request with their partners to recover the entirety. You could cover the entire planet with access to even as few as three or five or so large networks.

Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @11:32AM (#25347489)
You're definitely right that it is an issue that the traffic is plaintext but there are trade off costs that are not addressed by these standards, mostly in user control and fall back behaviour.

You've started using a pi-hole, and presumably are getting value from it. These protocols can potentially make it so you can't use that pi-hole at all.

Traffic that is local to a network being unencrypted is not a huge privacy problem. If this protocol was adopted by local resolvers, your pi-hole or network router could use it for any requests it makes while still preserving its ability to filter the traffic. It's basically all win under this scenario.

The problem comes back to applications implementing this in ways that can't be managed taking the option away from end users and administrators. Without the protocols specifying control and fall-back behaviours on networks that don't need or want this, it's more harmful than useful.

Re:Improving DNS Privacy with Oblivious DoH by stevepike on Tuesday December 08, 2020 @11:55AM (#25347877)
Can you explain (or share a link) to some proposal for how to enable my pihole to securely talk to upstream resolvers but force all embedded devices on my network to go through the pihole? Anything that lets my pihole sidestep my ISP seems like it'd also work for my xbox.
Re:Improving DNS Privacy with Oblivious DoH by judge2020 on Tuesday December 08, 2020 @03:07PM (#25350644)
> force all embedded devices on my network to go through the pihole

You can only do this for the devices that respect your DHCP-provided DNS config. Even if you redirect all port 53 traffic on your network to your pihole, a device can make its own (DoH or non-DoH) https connection and gets DNS responses via that, bypassing your pi-hole.

This was discussed extensively a few days ago on a thread about "72% of smart TVs and 46% of game consoles hardcode DNS settings":

https://news.ycombinator.com/item?id=25315172

Re:Improving DNS Privacy with Oblivious DoH by quicksilver03 on Wednesday December 09, 2020 @03:01AM (#25356387)
If you control DHCP and know the MAC address of those embedded devices, you can serve them a non-existing gateway so that they simply won't have a path outside of your home network.

Of course, that assumes IPv4, whereas with IPv6 and SLAAC I believe the only way is to firewall them out.

Re:Improving DNS Privacy with Oblivious DoH by GoblinSlayer on Wednesday December 09, 2020 @05:51AM (#25357324)
If they won't ask you to drink a verification can to proceed.
Re:Improving DNS Privacy with Oblivious DoH by RossM on Tuesday December 08, 2020 @12:37PM (#25348589)
Using Cloudflare with DoH is documented here: https://docs.pi-hole.net/guides/dns-over-https/

You essentially run a little proxy server on your pihole setup, and configure pihole to use it as your upstream dns resolver.

E.g., a proxy server running at 127.0.0.1:5053 which uses the Cloudflare ipv4/ipv6 DNS over HTTPS endpoints. This can also use other DoH endpoints as desired:

    /usr/local/bin/cloudflared proxy-dns \
      --port 5053 \
      --upstream https://1.1.1.1/dns-query \
      --upstream https://1.0.0.1/dns-query \
      --upstream https://2606:4700:4700::1111/dns-query \
      --upstream https://2606:4700:4700::1001/dns-query
Re:Improving DNS Privacy with Oblivious DoH by cassianoleal on Wednesday December 09, 2020 @04:31AM (#25356835)
That only does the part where the PiHole uses DoH. It doesn't stop individual devices from using it, and it doesn't force them to go via the PiHole.
Re:Improving DNS Privacy with Oblivious DoH by topranks on Tuesday December 08, 2020 @06:05PM (#25352776)
DNScurve never got far in the IETF but I like it:

https://tools.ietf.org/html/draft-dempsky-dnscurve-01

It’s being worked on again. The “client side” (from client to resolver) got all the attention in recent years. Even though it’s arguably less important than encrypting resolver to Auth traffic (as the resolver can often be close.).

Cynics say this is because there was money behind DoH which pushed it through standardisation, as the big providers are hungry for the data.

arguably the less important part of the equation

Re:Improving DNS Privacy with Oblivious DoH by 1vuio0pswjnm7 on Tuesday December 08, 2020 @07:49PM (#25353819)
I have used CurveDNS forwarders at home as an experiment for many years now. I have never had any problems. I cannot see why authoritative DNS providers would resist offering DNSCurve as an option. It is relatively easy to set up and does not require replacing or modifying any DNS software.
Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @12:16PM (#25348238)
I don't have any resources handily available for that. I would be truly surprised if pi-hole's don't support DoH though so I'd just try searching for something like "enabling DoH on a pihole" or similar.

Basically sounds like you've already done the hardest parts. Your router is redirecting all DNS traffic to your pi-hole, this will prevent any normal unencrypted DNS traffic from leaving your local network. You pi-hole will be in turn making all the DNS requests. If you turn on DoH for the pi-hole all the DNS requests on your network will be encrypted.

Re:Improving DNS Privacy with Oblivious DoH by hrez on Tuesday December 08, 2020 @05:24PM (#25352264)
Nothing would prevent DOH to use <randomIP>:<randomPORT> as a resolver. Be it an application or a device. Pi-hole will never see it.
Re:Improving DNS Privacy with Oblivious DoH by 1vuio0pswjnm7 on Tuesday December 08, 2020 @06:28PM (#25353027)
"I can't snoop on the network traffic going over https but somehow I can get a list of all names queried."

SSL/TLS's servername extension puts those names in plaintext just like DNS. The popular browsers all include this extension even when the website does not require it.

As such, one can get a list of names by snooping on HTTPS traffic, instead of DNS traffic:

https://github.com/kontaxis/snidump

ESNI-enabled software and Clouflare's ESNI-enabled CDN is an option, but you have to keep making DNS queries to get a key that changes every hour.

Re:Improving DNS Privacy with Oblivious DoH by nimrody on Wednesday December 09, 2020 @02:27PM (#25363239)
With time, client-side TLS tickets will become more common and session resumption means you won't always be able to see the SNI.
Re:Improving DNS Privacy with Oblivious DoH by iso947 on Tuesday December 08, 2020 @04:16PM (#25351447)
It’s progress if you control your devices, or you don’t control your network.

I don’t. Like most people I can control my network.

I have all sorts of crap on my network from Bose and amazon and Nintendo and Apple etc on my IoT vlan.

Without going to a monk style digital life aka RMS, the best bet is to segment them into a secure network and limit what they can communicate with. The DOH Culture and the like takes away my freedoms.

Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Tuesday December 08, 2020 @05:43PM (#25352513)
Then complain about devices that hardcode settings and don't allow changing them, rather than complaining about people taking what devices could already do and standardizing it so that anyone can use it in a more uniform way.
Re:Improving DNS Privacy with Oblivious DoH by xg15 on Tuesday December 08, 2020 @06:40PM (#25353168)
Complain to who exactly?

> people taking what devices could already do and standardizing it so that anyone can use it in a more uniform way.

In this case, standardization makes a huge difference.

Before DoH, this was theoretically possible, but needed enormous effort to pull off: The simplest thing a device could do was to hardcode custom DNS servers - but the network admin could easily bypass that by redirecting the packets, as described in this subthread.

Any more interception-proof solutions would have involved designing a custom network protocol, running a custom server and implementing custom bootstrapping logic to connect the device to the server - and even then, the traffic would stand out enough than an admin could still block or redirect it easily enough.

With DoH, there are publicly accessible servers that accept requests over plain HTTPS: This means, someone who wants to keep their ads from being blocked does not need to run any server infrastructure and does not need to fiddle with network code at all - they can just drop in a DoH client library, hardcode a list of public DoH servers and client certs and be done. This is absolutely a game-changer.

Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Tuesday December 08, 2020 @07:25PM (#25353635)
> With DoH, there are publicly accessible servers that accept requests over plain HTTPS

Which is a good thing for end users on balance.

The Internet is going 100% encrypted and that's a good thing. This helps towards that goal. Relying on unencrypted traffic will no longer work. Networks must not have the ability to intercept device traffic unless the device administrator (not the network administrator) configures it as such; any such mechanism completely breaks the security properties this is trying to achieve. Ultimately, your choice with uncooperative devices is "block the device or don't" (in addition to isolating it on a separate network), along with "replace it with a cooperative device". Stop telling people they need to stop using encryption so that your local network interception will keep working, because your local network interception is indistinguishable from other people's local network interception.

This feels like the geek version of DRM fallacies or the fallacies that governments believe about encryption. Somehow, there continue to be threads full of arguments that amount to "It should be possible for 'good' network admins to intercept traffic from devices that don't trust them, but 'bad' network admins shouldn't be able to intercept traffic from devices that don't trust them". That's fundamentally not possible; any mechanism usable by 'good' network admins can be used by 'bad' network admins. (Leaving aside that 'good' and 'bad' are relative.) And worse, people get so invested in their local network interception that once it becomes clear that isn't possible, some will start arguing that their local network interception is more important than general Internet security.

There are enough outside opponents of Internet security; let's not start holding back security ourselves because it makes our own hacks stop working. We have enough work to do fighting for the ability to keep the Internet secure against real adversaries. We absolutely need full control over our own devices, but many of the people most capable of fighting for that control got complacent about it because a subset of people could hack around it with local network interception stunts.

Re:Improving DNS Privacy with Oblivious DoH by Reelin on Wednesday December 09, 2020 @12:49AM (#25355745)
> there continue to be threads full of arguments that amount to "It should be possible for 'good' network admins to intercept traffic from devices that don't trust them, but 'bad' network admins shouldn't be able to intercept traffic from devices that don't trust them"

That's not what I see at all.

I see people pointing out that DoH hurts privacy and reduces control for end users by providing a convenient turnkey solution for device vendors to bypass filtering at the network level.

I also see it pointed out that DoH could have been specified in a way that facilitated filtering for the local network. Given that it's so obviously possible, the fact that it wasn't speaks volumes.

Note that (IIUC) your ISP can still see which sites you visit because TLS still transmits the FQDN in plaintext (https://security.stackexchange.com/questions/86723). Even if that stopped happening tomorrow, the destination IP would still be visible (not quite as bad but still reveals a huge amount of information). On top of all that, DNSSEC already exists which allows you to verify the authenticity of the query result. As such, the argument in favor of DoH would seem to be limited to preventing your DNS resolver (but not your ISP or VPN!) from tracking which sites you visit. I don't find that to be very compelling in light of the immediate downsides.

Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Wednesday December 09, 2020 @07:37PM (#25367831)
> I also see it pointed out that DoH could have been specified in a way that facilitated filtering for the local network. Given that it's so obviously possible

No, it couldn't have been, and this is exactly what I was referring to in my comment. Any mechanism that allows the local network to intercept the traffic of a device that doesn't trust the network can and will be abused. The entire point of DoH was to make DNS clients secure, by preventing ISPs and other network providers from monitoring, intercepting, or tampering with DNS results.

You're asking for DNS to be left insecure, so that you can tamper with it. You're asking for the security of clients that actually give users control (laptops, phones, etc) to be sacrificed so that you can continue to tamper with DNS results for clients that don't give users control.

> On top of all that, DNSSEC already exists which allows you to verify the authenticity of the query result.

DNSSEC isn't nearly widespread enough to expect to find it everywhere. Only very specialized clients could make it a requirement; most clients cannot. DNSSEC requires upgrading most of the world before people can rely on it; DoH is an incremental solution.

> As such, the argument in favor of DoH would seem to be limited to preventing your DNS resolver (but not your ISP or VPN!) from tracking which sites you visit.

SNI is being fixed. Once SNI is fixed, DNS is one of the last holes that allows your ISP or other network provider to track you.

And as mentioned above, since DNSSEC is not a viable solution anytime soon, DoH is also critically important to prevent ISPs and other network providers to tamper with your DNS results.

Re:Improving DNS Privacy with Oblivious DoH by tptacek on Wednesday December 09, 2020 @10:37PM (#25369358)
Some color to this: it's less than 2% of North American domains, the number of signed zones has actually dropped in some intervals, and it's practically nonexistent among big companies with security teams. Google isn't DNSSEC-signed. Neither is Microsoft. Or Facebook. Or Amazon (whose DNS service, Route53, doesn't implement DNSSEC). Or, last I checked, any US bank.

You can check this for yourself: make a list of domains, and then write a trivial script:

    #!/bin/sh
    while read domain
    do 
      ds=$(dig ds $domain +short)
      echo "$domain $ds"
    done
Re:Improving DNS Privacy with Oblivious DoH by unionpivo on Wednesday December 09, 2020 @09:45AM (#25358951)
I am cynical and maybe paranoid.

Be careful what you wish for

What I think will end up happening, most of the devices will go encrypted route [1]. Most things will run over https, and with encrypted sni, you won't even be able to block domains.

Encryption will be backdoored by governments (and of course other people that will reverse those backdoors or have friends in LEA ).

End result is encryption that people are championing as improving our privacy will make us more exposed and more vulnerable, because other people will have more access to our network, devices and data than we do.

I can and do run linux, so I don't have to worry about my os. But my hardware might phone home on its own. Phones are already lost causes. TV's almost as well.

I do hope you are right and I am wrong, I'd much rater be wrong.

[1] You already have hard time buying non smart TV. A lot of things nowadays expect network connection, and that trend is increasing.

Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Wednesday December 09, 2020 @07:41PM (#25367870)
People advocating a 100% encrypted Internet are also many of the same people fighting tooth and nail against backdoored or otherwise broken encryption.

It doesn't make sense to say that encryption will be backdoored so we should use plaintext. We should fight for security across the board, and fight against any threat to that security.

Re:Improving DNS Privacy with Oblivious DoH by xg15 on Friday December 11, 2020 @05:33PM (#25392365)
Again, this fight doesn't make any sense if that very same encryption is then used against us.
Re:Improving DNS Privacy with Oblivious DoH by Dylan16807 on Wednesday December 09, 2020 @01:24AM (#25355906)
> This feels like the geek version of DRM fallacies or the fallacies that governments believe about encryption. Somehow, there continue to be threads full of arguments that amount to "It should be possible for 'good' network admins to intercept traffic from devices that don't trust them, but 'bad' network admins shouldn't be able to intercept traffic from devices that don't trust them". That's fundamentally not possible; any mechanism usable by 'good' network admins can be used by 'bad' network admins. (Leaving aside that 'good' and 'bad' are relative.) And worse, people get so invested in their local network interception that once it becomes clear that isn't possible, some will start arguing that their local network interception is more important than general Internet security.

That's not the distinction at all.

It's that you should be able to set up interception on the local network at install time, but all other interception should be blocked. It's extremely possible.

Re:Improving DNS Privacy with Oblivious DoH by iso947 on Wednesday December 09, 2020 @04:23PM (#25365266)
I’m not held hostage by my ISP - I choose one that doesn’t do that. Even if I didn’t trust the last mile, that’s why I can choose to implement a vpn for some or all of my devices on my network so I can bypass a hostile isp.

It might be good for the average technophobic end user to trust google instead of their ISP, but it’s not good for me to trust google over my ISP.

Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Wednesday December 09, 2020 @07:24PM (#25367695)
Most users do not have a meaningful choice of ISPs. That was true back in the days of modems, and somewhat true in the days of DSL. It is not true at all in the days of fiber and cable.
Re:Improving DNS Privacy with Oblivious DoH by xg15 on Friday December 11, 2020 @02:12PM (#25389468)
> Networks must not have the ability to intercept device traffic unless the device administrator (not the network administrator) configures it as such

The device admin of an iPhone is Apple, the device admin of a non-rooted Android phone is Google, the device admin of a Windows 10 PC is Microsoft and the device admin of a smart TV is likely Samsung. Is that the point you want to make?

All of those companies have incentives to collect user data and are known to push user-hostile changes. They also either have known ties with the NSA or can be coerced via National Security Letters, making even the tired point about "defense against state actors" moot. Do you trust any of them?

If, say, Tencent brought a phone to market in the US that turns out wildly popular but happened to exchange vast amounts of data with servers in China, would you be ok with that?

Most devices today have locked-doen bootloaders, so I don't actually have a choice about the device admin for my device. The position of network admin can be abused, too, but at least there is a possibility I can fill this position myself or can delegate it to someone who I trust.

> Ultimately, your choice with uncooperative devices is "block the device or don't", along with "replace it with a cooperative device".

Right now there are huge market incentives to make devices ever more uncooperative. Unless something changes, the choice for consumers will likely be soon "tolerate an uncooperative device and don't block it - or opt out of technological progress altogether".

> That's fundamentally not possible; any mechanism usable by 'good' network admins can be used by 'bad' network admins.

This argument doesn't get any more coherent no matter how often it's repeated. Somehow the tech industry keeps arguing that the key to any kind of mandatory backdoor will leak with mathematical certainty - while employing that exact same kind of backdoor for their own purposes without any worry - in the form of forced updates and forced telemetry. How exactly can the same technology be a security risk when used by a government but a security best practice when used by a private company?

> We absolutely need full control over our own devices, but many of the people most capable of fighting for that control got complacent about it because a subset of people could hack around it with local network interception stunts.

So then what would be your idea how to gain control?

Re:Improving DNS Privacy with Oblivious DoH by SAI_Peregrinus on Tuesday December 08, 2020 @10:10PM (#25354887)
This isn't new to DoH. Malware has used alternatives to DNS for getting command & control server IPs for decades. IRC used to be common, for example.
Re:Improving DNS Privacy with Oblivious DoH by iso947 on Wednesday December 09, 2020 @04:21PM (#25365233)
IRC easilly slotted and controlled.
Re:Improving DNS Privacy with Oblivious DoH by SAI_Peregrinus on Wednesday December 09, 2020 @10:02PM (#25369121)
Yes. Which is why it's no longer as popular. The point is that malicious actors have never followed the system's preferences on how to look up server IPs, so why the hell should they start now? DNS blocking hasn't worked up to now, why complain that it's suddenly broken?
Re:Improving DNS Privacy with Oblivious DoH by m463 on Tuesday December 08, 2020 @06:52PM (#25353326)
The answer is - it depends.

If you own the device(s) (your internet connection, phone or a colo), and it is someone else's network - you want security.

If it's a device (smart tv, media player, iot) that you don't "own" on your network you want control.

Re:Improving DNS Privacy with Oblivious DoH by OJFord on Tuesday December 08, 2020 @02:37PM (#25350257)
The 'historical quirk' per my understanding is pretty much IPv4 NAT.

At least, I couldn't figure out how to do it with IPv6 (no (need for) NAT) - I ended up dropping them if not destined for my desired DNS instead.

(NAT lets you Translate Addresses, usually to save IPv4 space, but here to redirect to a different DNS. IPv6 fixes the address space problem with more addresses, so the hack is done away with, and everything on the network can 'route itself' to everything else without any translation, as pre-NAT and as always intended.)

Re:Improving DNS Privacy with Oblivious DoH by toast0 on Wednesday December 09, 2020 @01:53AM (#25356038)
Transparent proxying works for IPv6 as well as IPv4. It's a little challenging to do transparent proxying on a box that's not the firewall. If the firewall and the proxy are on the same ethernet broadcast domain, you can forward the packets (i think for Linux you'd need to do policy routing on the port?, for ipfw there's a forward action, i think pf would be route-to); and if they're not, you'd need to tunnel the packets to the proxy.

NAT doesn't really have much to do with it, other than you with NAT, you certainly have a device on your network that's capable of being a transparent proxy, whereas without NAT, you could just have a unmanaged switch to share your upstream connection between multiple computers; assuming your provider is enlightened and provides ethernet or an ethernet bridge with nothing else in the way.

Re:Improving DNS Privacy with Oblivious DoH by OJFord on Wednesday December 09, 2020 @02:11PM (#25362956)
> think for Linux you'd need to do policy routing on the port?

I think that's probably the crux of what I'm getting at - and I should say this is all from fiddling at home and not working in networking - with iptables you can `-j DNAT --destination $desired_dns_ip`, but if you don't have NAT then you're left with `-j REDIRECT --dport $portchange`, which yes, takes a destination port, not IP.

> other than you with NAT, you certainly have a device on your network that's capable of being a transparent proxy

Yes exactly, that's all I meant really. After all, the context is a home user configuring a home user's 'router' (i.e. switch, firewall, AP, ...) to send DNS requests to PiHole, right.

Re:Improving DNS Privacy with Oblivious DoH by toast0 on Wednesday December 09, 2020 @02:41PM (#25363478)
The first part is really just a tooling issue. iptables doesn't have a -j FORWARD to pass the packet as-is to another host, but it's certainly possible to make it happen. I didn't look at nftables to see if it does either.
Re:Improving DNS Privacy with Oblivious DoH by OJFord on Wednesday December 09, 2020 @04:00PM (#25364881)
Yeah absolutely, as I said in a another branch of this thread, it's all just (plaintext even) 1s & 0s at the end of the day, you can flip some; I do understand that.

It's just that our starting point here was something like 'what can a software engineer do in an hour or so one evening to get their home DNS traffic going through a Raspberry Pi on the LAN'.

I happened to have, er, exactly this experience recently with my (OpenWRT) router(+...) and with that tooling, I couldn't make it work. I settled for DNAT for v4 & DROP^ for v6 because that's what I could get done that evening and it didn't (and hasn't) seem(ed) to be a problem.

^(as in, anything trying to use a different IP, if it's already destined for my DNS that's fine. The hope being that it falls back on v4 at least, even if not the provided DNS over v6.)

Re:Improving DNS Privacy with Oblivious DoH by Denvercoder9 on Tuesday December 08, 2020 @05:07PM (#25352041)
Any firewall worth its salt can do this with IPv6 as well. There's nothing on a technical level preventing it.
Re:Improving DNS Privacy with Oblivious DoH by OJFord on Tuesday December 08, 2020 @07:50PM (#25353834)
iptables?

Of course it's technically possible, it's all just packets of data that you can change, at the end of the day. I just meant that the easy way to do it (AIUI) went away with IPv6 because you were never supposed to need to do that, and with v6 you 'don't'.

It's not like the purpose of firewalls is redirection.

Re:Improving DNS Privacy with Oblivious DoH by Reelin on Wednesday December 09, 2020 @12:20AM (#25355627)
I thought that iptables was the easy way to do it? (Both for IPv4 and IPv6.)

NAT66 is an experimental (10 years old IIUC!) RFC for one-to-one IPv6 mapping. While there's no RFC specifying an official method of masquerading behind a single address, AFAIK iptables "just works" (as long as you aren't running FreeBSD).

Re:Improving DNS Privacy with Oblivious DoH by X-Istence on Tuesday December 08, 2020 @11:59PM (#25355536)
Create a loopback interface and assign it the IP address you want redirected, then have your DNS resolver bind to those IP's.
Re:Improving DNS Privacy with Oblivious DoH by vim1234 on Tuesday December 08, 2020 @10:40PM (#25355055)
Yeah it is true, but the problem is if DoH with its privacy features come along it will be literally impossible to block ads with PiHole, as all DNS quesries will be encrypted (which DoH does ofc rihgt now).

So no ability to block ads in TV or malicious domains that IoT deviced connect to or even blocking Windows, macOS telemetry network wide as all DNS requests will be encrypted which they are not as of right now.

Re:Improving DNS Privacy with Oblivious DoH by fpoling on Wednesday December 09, 2020 @05:04AM (#25357037)
It will be possible, just harder. I will not be surprised if there will be services where one can get a database of IP addresses of bad domains and one could block that, the same way one does with spammers. Surely it may block sites that share hosting on those domains, but it then it puts pressure on sites to avoid such sharing sharing.
Re:Improving DNS Privacy with Oblivious DoH by xg15 on Wednesday December 09, 2020 @10:36AM (#25359594)
> but it then it puts pressure on sites to avoid such sharing sharing.

Not really if that hoster is Cloudflare.

Re:Improving DNS Privacy with Oblivious DoH by saurik on Tuesday December 08, 2020 @02:37PM (#25350253)
On every single operating system it is possible for this kind of improvement to be installed as a system-wide replacement for the local resolver, whether by a direct plugin or by running a resolver on localhost. This is how these upgrades can be deployed if you don't want to wait for the OS.

The problem is that browsers and other applications are just unwilling to let the user see how their products work or decide anything for themselves--or even just architect their installers to involve dependencies on a shared resolver upgrade--and so we end up in this hell of applications actively hiding their traffic from you.

And like, "great": now we have a new version of DoH and have to wait for everyone to upgrade their apps that upgraded to DoH before? This is ridiculous bullshit... this should be a single app on your device you now upgrade. Hell: Cloudflare even develops that app for a number of platforms! They aren't even the problem... it is everyone who jumps on "embedding" this behavior :/ :/ :/.

(For a more technically-comprehensive rant about this, read my comment from a year ago:)

https://news.ycombinator.com/item?id=21701808

Re:Improving DNS Privacy with Oblivious DoH by judge2020 on Tuesday December 08, 2020 @02:57PM (#25350510)
iOS and MacOS technically have this (requires a profile[0]) but Microsoft will probably drag their feed on this for the next 2 years with the amount of enterprise customers they have to keep happy; and, given that the network adapter config is still based on Aero controls, they're probably in no rush to add more configuration options before upgrading it to Metro controls.

0: https://paulmillr.com/posts/encrypted-dns/

Re:Improving DNS Privacy with Oblivious DoH by teddyfrozevelt on Tuesday December 08, 2020 @08:21PM (#25354134)
Re:Improving DNS Privacy with Oblivious DoH by judge2020 on Tuesday December 08, 2020 @10:27PM (#25354994)
nice to see - looks like it's even been ported over to the settings app -

https://blogs.windows.com/windows-insider/2020/08/05/announc...

I still think Chrome and FF having it is a net positive though - The steam hardware survey shows 7% of users' OS is a Windows version before 10, so all of these users can use it today before it gets to them in the next major Windows 10 update.

Re:Improving DNS Privacy with Oblivious DoH by saurik on Wednesday December 09, 2020 @05:05AM (#25357040)
? On Windows this is trivial to implement as you can just set the resolver to DNS on localhost; the only reason iOS needs something special is because you can't run servers/daemons.
Re:Improving DNS Privacy with Oblivious DoH by JoshTriplett on Tuesday December 08, 2020 @05:41PM (#25352485)
This is exactly why browsers support doing their own name resolution: because some OSes advance much more slowly.
Re:Improving DNS Privacy with Oblivious DoH by saurik on Wednesday December 09, 2020 @05:06AM (#25357046)
But instead of it being in the browser, it should be a separate app that upgrades all apps that use the native resolver.
Re:Improving DNS Privacy with Oblivious DoH by 1over137 on Tuesday December 08, 2020 @03:14PM (#25350727)
Why on earth is a "configuration profile" required for this?
Re:Improving DNS Privacy with Oblivious DoH by judge2020 on Tuesday December 08, 2020 @04:11PM (#25351400)
I imagine Apple is weary about having a UI for this since it might cause more bad PR/complaints about people being able to get around (for example) school website filters. Chrome eased its UI rollout by introducing a managed policy that admins could configure before the UI was enabled. https://cloud.google.com/docs/chrome-enterprise/policies/?po...
Re:Improving DNS Privacy with Oblivious DoH by alwillis on Wednesday December 09, 2020 @01:39AM (#25355976)
Because if you need to configure a fleet of Macs or iOS devices for a school or business, it’s easy to push a configuration profile to all of them using tools commonly in use by IT departments and admins.
Re:Improving DNS Privacy with Oblivious DoH by gumby on Tuesday December 08, 2020 @11:07AM (#25347063)
> Querying nameservers is being pushed into applications themselves...

I agree: this absurd trend will lead to every app essentially including an entire O/S. There are several reason why OSes provide services to applications and one is that the OS manages the user's configuration (e.g. what devices are plugged in, where and how to resolve names, cacheing data, etc).

I also find it rather insane the amount of overhead required to resolve a name when an entire http connection needs to be set up and torn down for the process.

Re:Improving DNS Privacy with Oblivious DoH by rusk on Tuesday December 08, 2020 @02:46PM (#25350363)
I presume there’s some kind of connection pooling going on ... but yeah you’ve still got the needless verbosity of HTTP for a specialised high volume protocol ...
Re:Improving DNS Privacy with Oblivious DoH by rubyfan on Tuesday December 08, 2020 @11:59AM (#25347950)
When enterprises own the devices on their networks they can add whatever root certificate they like and MITM filter whatever they like. This makes over the network traffic more secure and does nothing to really impact threat detection.

If you don’t own the device then 1) should you be interfering or snooping the traffic at all? 2) if you need to limit threat then subnet clients you don’t own.

Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @12:23PM (#25348351)
Adding in root certificates and performing HTTPS MITM even on your own network is a huge risk on its own. You're basically breaking many layers of security such as certificate pinning that just get disabled with any custom root certificate. Those middleboxes will always break client certificate authentication and you're trusting that they are checking the various revocation lists they should be (CRL/OSCP/various built-in blocklists).

For your basic premise to work, it also means that the MITM middleboxes will need to support the DoH protocols and support recording, and filtering those responses.

Additionally, custom roots certificates will only work on devices that you can actually set a custom root certificate for, a great example is IoT devices. Is your TV suddenly talking to a botnet or was that a legitimate update?

We can argue about whether those middleboxes are even sane to deploy (hint: they're not), but what is historically true is that they are known to update slowly to new protocols, if at all and are known to cause compatibility issues for traffic that is inherently expected to be unchanged. They're enough of a problem at the _TCP_ layer that QUIC was explicitly designed that minimal information is available in the protocol headers so middleboxes would have less to mess with.

Re:Improving DNS Privacy with Oblivious DoH by rubyfan on Tuesday December 08, 2020 @10:08PM (#25354874)
oh don’t get me wrong, i’m not advocating for root certs and MITM boxes. i’m just saying DOH isn’t really going to challenge an enterprise’s ability to sniff and intercept DNS.

notwithstanding other technical issues, it’s just bad practice to create the sort of experience MITM creates.

when people are used to seeing compromised https when on the corp network or mitm boxes prompting for auth periodically it basically lowers people’s guard on that stuff and opens the door.

Re:Improving DNS Privacy with Oblivious DoH by topranks on Tuesday December 08, 2020 @06:08PM (#25352818)
Not with TLS1.3 and DoH and ENSI they can’t.
Re:Improving DNS Privacy with Oblivious DoH by gsich on Tuesday December 08, 2020 @08:31PM (#25354238)
ESNI is a draft. No support in Chrome and OpenSSL.
Re:Improving DNS Privacy with Oblivious DoH by zem on Wednesday December 09, 2020 @05:58AM (#25357361)
do you own a smart tv in your house?
Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @11:47AM (#25347750)
The problem is that the things you most want to block can trivially bypass your local DNS filtering - DoH is just standardizing something which has been done for decades.

The only effective measure is to block outbound network access and require use of a proxy, possibly optimized by allowing direct traffic only from clients with functioning endpoint monitoring agents.

Re:Improving DNS Privacy with Oblivious DoH by yardstick on Tuesday December 08, 2020 @05:00PM (#25351964)
DoH is highlighting the security nightmare that is AWS, GCP, Azure, Cloudflare etc with their reverse proxies and virtual hosts, making it impossible to safely restrict a network from communicating with only a specific cloud-hosted service.

Also often perfect security isn’t required. Doors with locks are good, but useless if the burglar just breaks the full length glass window next to it. They still serve a purpose, but don’t need to be an absolute comprehensive solution.

Re:Improving DNS Privacy with Oblivious DoH by jiggawatts on Tuesday December 08, 2020 @11:08PM (#25355237)
The biggest mistake I see in public cloud fundamental architecture is that it uses IPv4 end-to-end, instead of just as a compatibility add-on to native IPv6 networking.

Literally all of the security issues caused by the public cloud network architecture instantly evaporate with IPv6, as well as much of the configuration complexity.

No more private networks with non-routable addresses! Instead you get a public-routable IPv6 block.

No more split-routing issues.

No more "gateways" or "peerings" or "service endpoints".

No more Private DNS Zones that may or may not work across virtual network boundaries.

No more copying DNS records into on-premises Active Directory DNS.

Every VM can get a globally unique address. So can every service, of any type! No more conflicts. No need to carefully "carve up" and "allocate" addresses. Just let the system take care of it...

No more sharing IPs with other customers. Every resource, no matter how tiny can get a dedicated address. Got an S3 bucket with 1KB of files in it? You get your own IP!

Every VM or service sees the real client IP, not the reverse proxy IP.

No need for SNI, ESNI, or even host headers since every web server can have a dedicated IP.

No reverse proxy means that load-balancers can simply set up the TCP handshake and then everything runs directly at wire speed. There is never a need to "scale" a load balancer.

The IPv6 addresses are consistent, globally. The IP address of the cloud VM is the address you register on-premises to SSH to it. No NAT magic involved at any point.

Adding a private link (e.g.: ExpressRoute) doesn't change your address ranges. They're the same, only the routes change. This would be a completely transparent change to your firewall rules of whitelisting setup.

Etc...

PS: The current Azure IPv6 architecture reproduces all of the limitations of their IPv4 architecture. They even NAT the addresses! You literally cannot have any of the above, ever, with Azure using IPv6 as it is now. They even limit the number of IPv6 addresses to further restrict you. If they do fix it, you'll have to redo your entire IPv6 setup. It's insanity.

Re:Improving DNS Privacy with Oblivious DoH by Reelin on Wednesday December 09, 2020 @01:19AM (#25355880)
Thanks for spelling it out like that - I think I might see the bigger picture here now. DoH (which incorporates DNSSEC under the hood) to protect the name lookup. IPv6 to provide unique addresses for every single service you connect to. The complete removal of SNI (as a security threat) and ESNI (as unnecessary complexity).

Pi-hole type filtering is then implemented based on IP blocks instead of DNS queries. Any unrecognizable IP address is default denied. Tracking, analytics, and ads could still be proxied by a remote host, but that can already happen anyway.

Of course, your ISP (or VPN, or anyone else along the network path) could employ the exact same approach to determine the services you connect to. Which leads me right back to DoH being largely pointless and Tor or similar being a hard requirement for actual privacy. Unless I'm missing something?

Re:Improving DNS Privacy with Oblivious DoH by yardstick on Wednesday December 09, 2020 @04:46AM (#25356906)
Due to consumer privacy concerns there will always be people wanting a high degree of anonymity when accessing services, regardless of IPv4 or IPv6. Both from consumers and the people running the services. Right now CDNs provide this privacy using TLS with ESNI. This won’t go away with IPv6. Likewise with DDoS concerns some will want to put CDNs and cloud reverse proxies in front of their services, intermingled with lots of other services.

The solution of dedicated IPv4/IPv6 is necessary for proper network control. But for the reasons above many won’t do so.

Also IPv6 is fundamentally not ready for real world use within small/medium businesses and homes IMO. I know you were talking about IP networking within clouds, forgive me, this rant isn’t aimed at that, it’s just my general IPv6 is not ready rent. At least not without NAT. Why?

- Can’t just simply put one IPv6 router/firewall behind another. Not all IPv6 routers support DHCP-PD, and even if they did, you could have 2-3-4 levels of routers/firewalls at a business. I’m not making this up- retail/gas/food industries often have a plethora of networks at a location, and the business/franchise owner is not tech literate, or even if they were, the equipment is managed by third party vendors and they don’t want to customise their IP network for each location. It makes for messy deployment and maintenance.

- Can’t just simply open a firewall rule on the main site router to forward say HTTPS to an internal service. Why? Not all ISPs give static IPv6 prefixes, not all PCs/servers/devices support DHCP6 for static leases, and then there’s IPv6 privacy addresses. Yes, you can statically configure (only if ISP is static too!). No, I don’t want to open the port to all devices on the LAN and no I can’t rely on each device to be running their own firewall (let alone a properly configured one!).

- WAN failover / multiple ISPs is hard. You have a fibre primary feed, and a secondary cellular/5G feed. Each has different IPv6 addresses. How do you ensure the right ISP is used at any given point? IPv6 shifts this decision to the client. This makes load balancing and policy based traffic routing (eg VoIP over fibre 1, FTP over fibre 2, etc). Also the cost of using a multi-homed IPv6 subnet & BGP in a SME/retail business is out of the question (plus the cellular ISP wouldn’t support it anyway).

All the above works fine out of the box with IPv4 and NAT. It’s bread and butter easy. At the cost of not having dedicated unique public IPs but these places simply don’t need them.

What IPv6 should have done to ensure a smooth migration is allowed for NAT from the very start. That would have let everyone who needed public IPs get them straight away, and those that didn’t to still migrate anyway with as little drama as possible. But it’s just not the case, NAT has been slowly added but it’s support is far from ubiquitous that IPv4 has.

Re:Improving DNS Privacy with Oblivious DoH by jiggawatts on Friday December 11, 2020 @02:24AM (#25383271)
> Due to consumer privacy concerns there will always be people wanting a high degree of anonymity

"No one can have glass windows in their homes, because a few people like to walk around naked at home, and they're worried about their privacy."

or

"You can't have steak, because if a baby were to eat it, they might choke."

> Right now CDNs provide this privacy

Nothing at all stops you using CDNs with IPv6.

> Also IPv6 is fundamentally not ready for real world use within small/medium businesses and homes IMO.

The protocol has been ready for 10+ years. I'm on an IPv6-enabled home network right now, and it works just fine.

As for the rest of your arguments: They're a side-effect of there being insufficient pressure on ISPs to do their jobs.

If public cloud providers primarily used IPv6, that would very rapidly force ISPs to get their act together and fix their woeful IPv6 support!

Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @07:15PM (#25353557)
> DoH is highlighting the security nightmare that is AWS, GCP, Azure, Cloudflare etc with their reverse proxies and virtual hosts, making it impossible to safely restrict a network from communicating with only a specific cloud-hosted service.

This problem goes back a lot further than that — even prior to having CDNs in common usage you had plenty of different clients sharing IP space at hosting companies and the really malicious stuff just using compromised computers. It's also not fully covering the threat model here: for example, if you are concerned about privacy there are whole classes of device which you simply cannot allow because blocking one feature simply means that the vendor will run everything through the same endpoints required for the device to work.

> Also often perfect security isn’t required. Doors with locks are good, but useless if the burglar just breaks the full length glass window next to it. They still serve a purpose, but don’t need to be an absolute comprehensive solution.

Perfect is the enemy of the good but you have to also think about the asymmetry here. Trying to hijack DNS is only useful when you control the network but neither the client or server. Trying to stop malware by politely asking them to play nicely is a losing game and the IoT devices many people worry about have entire teams devoted to bypassing you as well (e.g. if any significant number of people tried to block a TV from reporting your viewing activity, the endgame is that viewing history and software updates would both go through samsung.com, not that they'll give up millions of dollars in revenue). That leaves you with cases where you do control the client and thus have less invasive alternatives such as installing an ad blocker or using a different browser.

Re:Improving DNS Privacy with Oblivious DoH by yardstick on Wednesday December 09, 2020 @04:57AM (#25356991)
> Trying to hijack DNS is only useful when you control the network but neither the client or server.

This is a very common scenario in retail and SME businesses where you can’t control the on site hardware, eg fuel pumps or CCTV or cash registers or footfall counters or vending machines or whatever, and you can’t control what IPs they talk to. But you still have an obligation to minimise their network access.

Unfortunately they use services hosted on the cloud in dynamic IPs, so you either need to MITM TLS (can’t, no way to change the trusted CA list in these devices), or you need to MITM DNS / SNI. It’s not perfect security, and ideally the business simply wouldn’t buy such poorly securable products, but technology decisions are very rarely vetoed by security considerations, especially when cost is a factor. This is an example of the appropriate level of security for the business risk appetite. Telling the business to buy products that can be locked down perfectly is normally a non-starter.

Re:Improving DNS Privacy with Oblivious DoH by acdha on Wednesday December 09, 2020 @10:34AM (#25359570)
Again, though, this is only forcing them to understand how their network has always worked rather than changing the situation. If the vendor chooses to bypass the local DNS, you won’t know about it no matter whether DoH exists.
Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Tuesday December 08, 2020 @12:11PM (#25348140)
How can they trivially bypass this local filtering? If the router is redirecting all port 53 traffic, there is no way to bypass aside from some alternate name resolution scheme.
Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @12:54PM (#25348873)
If the network allows outbound traffic, they can hard-code an IP list - this is how Cloudflare’s 1.1.1.1 works and malware has done this for decades – or they can use local DNS to resolve a single name which will answer or redirect to a service which does further queries. Malware commonly used IRC for this until that started getting blocked on most networks, but imagine how easy it would be to miss, say, a bot which connects on 443 to a major hosting provider, like half the apps you run, searches Google.com, Twitter, etc., or hits an ad network for a keyword selected by the attacker.

In every case, once they get the server(s) to connect to you lose all further visibility unless you’re blocking 443 and forcing traffic through an inspection proxy.

Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Tuesday December 08, 2020 @01:27PM (#25349375)
Yeah, it’s an arms race, but I suspect it’s solvable: at least solvable enough that it’s feasible to just not use devices that break your policies. For things like Pi-Hole, the setup I describe will reduce much of the ad noise even without more complicated systems.
Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @02:19PM (#25350034)
The way to solve is either to segregate unmanaged devices onto a separate network and give up on controlling them or to implement the system I described. The same Pi running a DNS server can run a proxy which applies blocking policies on all hostnames.
Re:Improving DNS Privacy with Oblivious DoH by xg15 on Tuesday December 08, 2020 @06:49PM (#25353286)
> The same Pi running a DNS server can run a proxy which applies blocking policies on all hostnames.

With DoH, it's easy to not just hardcode the resolver's IP but also the resolver's certificate. How would a proxy be able to intercept that?

Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @07:04PM (#25353449)
If you configure an HTTPS proxy, the client will use the proxy's name to verify the connection to the proxy and trust that the proxy will verify the remote connection.

If you're trying to configure transparent proxying where the network redirects traffic to a different device, you would need to have a local CA so you can forge certificates — that's not uncommon in enterprise IT but it's definitely a security risk associated to having something which can MITM anything on your network.

In either case, the real question is whether you control the endpoint. If it doesn't support configuring a proxy or installing a CA, all you have is the binary decision to decide whether or not to allow it on the network at all since whoever does control the client has so many options for smuggling traffic out.

Re:Improving DNS Privacy with Oblivious DoH by xg15 on Tuesday December 08, 2020 @06:47PM (#25353261)
> If the network allows outbound traffic, they can hard-code an IP list - this is how Cloudflare’s 1.1.1.1 works and malware has done this for decades – or they can use local DNS to resolve a single name

Why can't you redirect all 53 traffic to a pihole and block that single name?

Re:Improving DNS Privacy with Oblivious DoH by acdha on Tuesday December 08, 2020 @06:57PM (#25353389)
In this case the client isn't sending traffic on port 53 at all — they already have the IP for the target server and so they just open a connection to it on port 443.

This is not hypothetical: it's how DoH works now but it's also how various things have worked for decades. Malware liked it for hiding command-and-control name queries from the few people who monitor DNS but it was also an option for anyone who had problems with buggy or malicious local DNS servers to add public resolvers like 8.8.8.8 or their own infrastructure into the search list so they didn't get support calls due to some ISP breaking their own DNS server.

The key part is remembering that this was always possible. DoH just meant that more people became aware of the gap they'd always had in their network management.

Re:Improving DNS Privacy with Oblivious DoH by SkyPuncher on Tuesday December 08, 2020 @04:20PM (#25351498)
Based on this: https://stackoverflow.com/questions/33099569/how-does-sock-5...

> Firefox, for example, sends hostname to SOCKS proxy without resolving it.

So a simple proxy can bypass local restrictions.

-----

I remember doing something similar back in my IT days just to see if it was possible. It was.

Re:Improving DNS Privacy with Oblivious DoH by pdonis on Tuesday December 08, 2020 @09:37PM (#25354662)
> If the router is redirecting all port 53 traffic

Then it won't do anything to DNS over HTTPS traffic that is going over port 443. And it won't be able to distinguish that traffic from any other HTTPS traffic.

Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Wednesday December 09, 2020 @01:36AM (#25355957)
There’s theoretically ways to solve that: https://news.ycombinator.com/item?id=25349358
Re:Improving DNS Privacy with Oblivious DoH by chipb on Tuesday December 08, 2020 @12:46PM (#25348735)
How well does the redirect scheme work for a device that connects to a central DNS server listening on, say, port 5353 instead? What about 80 or 443?
Re:Improving DNS Privacy with Oblivious DoH by jlgaddis on Tuesday December 08, 2020 @01:55PM (#25349777)
Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Tuesday December 08, 2020 @01:26PM (#25349358)
Well, it’s more complicated, but in theory you could do some deep packet inspection that understands the protocols: personally, I’d use this to break DoH connections (for every host name seen in SNI, attempt a DoH query, if it resolves, reset the connection) and attempt to force everything to fall back to plain DNS. Then, whitelist a couple outbound ports (on most networks, maybe just 443 + 53?) and block VPNs.
Re:Improving DNS Privacy with Oblivious DoH by dhaavi on Tuesday December 08, 2020 @03:43PM (#25351084)
With the Portmaster (https://github.com/safing/portmaster) we're going in that direction, but it will take a couple more years to be able to go that deep. Have a look!
Re:Improving DNS Privacy with Oblivious DoH by judge2020 on Tuesday December 08, 2020 @03:10PM (#25350682)
> or every host name seen in SNI

Not going to be possible in a few years or so:

https://news.ycombinator.com/item?id=25344311

Re:Improving DNS Privacy with Oblivious DoH by dhaavi on Tuesday December 08, 2020 @03:41PM (#25351061)
meh. The outer SNI and the IP address still tell a lot about what you are doing online.
Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Wednesday December 09, 2020 @01:39AM (#25355973)
Also, with things like this, you can just reset connections using HTTPS features you don’t support. It might eventually become painful, but it’ll be fine for the near future. And, if enough enterprise middleboxes do this, the standards will be DOA.
Re:Improving DNS Privacy with Oblivious DoH by vageli on Tuesday December 08, 2020 @12:51PM (#25348814)
> How well does the redirect scheme work for a device that connects to a central DNS server listening on, say, port 5353 instead? How about 80 or 443?

Just because it is not a silver bullet doesn't mean it is not effective for a large percentage of users.

Re:Improving DNS Privacy with Oblivious DoH by admax88q on Tuesday December 08, 2020 @12:32PM (#25348516)
Pi-hole is still very much niche, and outside of that and enterprise network admins, the majority of users are stuck using the trash resolver of their operating system directed to the trash DNS servers of their ISP.

If DNS level blocking ever becomes popular enough, malware authors will change their systems to not use the system's DNS, or to use hard coded DNS over TLS/HTTP servers that they know will serve them the data they want.

Preventing proprietary applications from doing malicious things is a constant cat and mouse game. Pi-hole works well for now, I would argue, because it's not popular enough to put a big enough dent in the success rate of malware.

Re:Improving DNS Privacy with Oblivious DoH by zamadatix on Tuesday December 08, 2020 @01:39PM (#25349545)
DNS level blocking is extraordinarily common in enterprise settings though so the cat and mouse game for malware trying to avoid it is decades in the making at this point, pi-hole is just a recent common name in the prosumer space.
Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @12:52PM (#25348840)
pi-hole is the most recognized name on here, but I think you're wrong about DNS level blocking. There are lot of home routers that have started integrating that feature natively. A few examples that I know off hand:

- Motorola MH7022

- Eero

- Disney Circle

Basically any of them that say "content filtering" in their product sheet are using DNS level filtering.

> ...the trash resolver of their operating system...

I'm very curious why you think the well tested, vetted, and constantly updated resolvers built into OS's are "trash". Is it just because most don't have support for DoH or DoT?

Re:Improving DNS Privacy with Oblivious DoH by admax88q on Monday December 14, 2020 @02:59PM (#25422414)
Most of the OS level resolvers just forward to the resolver provided via DHCP. Which is fine for enterprise, but for home users means using the ISPs resolver, which can track users and has a history of injecting ads on failed resolutions.

Not to mention the user interface for configuring them has never evolved beyond /etc/hosts and the total disaster that is /etc/resolv.conf (on modern linux distros).

The fact that I have to run a separate device such as pi-hole to intercept DNS rather than just point my OS resolver to a blacklist indicates how OS level resolvers have not kept up with the use cases people are asking of them.

And of course, no support for DoH or DoT or even DNSSEC.

Re:Improving DNS Privacy with Oblivious DoH by josephcsible on Tuesday December 08, 2020 @03:59PM (#25351275)
It's a good thing that network-level filtering is getting harder. If you can use network-level filtering to block ads/trackers/malware from your own devices, countries and ISPs can use network-level filtering to censor other people's devices. If you want to protect your own devices, do it locally, even if it means configuring Firefox instead of just the OS.
Re:Improving DNS Privacy with Oblivious DoH by wtetzner on Tuesday December 08, 2020 @01:13PM (#25349184)
I don't know much about the tech, but would it be possible to setup your own local DNS server that your machines point to, and do the filtering within that DNS server?
Re:Improving DNS Privacy with Oblivious DoH by rsync on Tuesday December 08, 2020 @03:42PM (#25351067)
I run my own recursive resolver (DNS server) in a datacenter.

This DNS server gets its upstream resolution from nextdns.io which is configured with several blocklists - including one that is roughly analogous to ublock origin.

On my local network, my DHCP server hands out my DNS server to all clients.

This means that all clients on my network get fairly robust ad-blocking even if they do not have an adblocker installed. It also means that non-browser clients (Sonos, AppleTV, etc.) get ad/tracker blocking as well.

DoH sort of breaks all of this, unfortunately.

Individual devices or clients or browsers can now connect to trackers and ad-servers over HTTPS, bypassing my adblocking resolver.

I thought that perhaps there was a solution wherein you would pre-query every single new IP you connected to over HTTPS and send it a test DNS query .. and if it answered DNS, you would just refuse to talk to it. I think this falls apart, however, if (for instance) google just queries "google.com" ... now you're denying google.com because it answers DNS queries over HTTPS...

Look, back when 8.8.8.8 came online I could just smell it ... I knew there was a user-hostile arms race somewhere in there I just didn't know where. Now we know.

Re:Improving DNS Privacy with Oblivious DoH by 1vuio0pswjnm7 on Tuesday December 08, 2020 @07:58PM (#25353919)
Google public DNS (8.8.8.8, 8.8.4.4) was created because OpenDNS was redirecting "Google queries" typed into the browser GUI (rather than typed into an HTML form on a website).
Re:Improving DNS Privacy with Oblivious DoH by 1vuio0pswjnm7 on Tuesday December 08, 2020 @08:44PM (#25354350)
It is not difficult to run own DOH server. For example, dnsdist >1.4 seems to be a popular choice:

https://blog.apnic.net/2020/02/28/how-to-deploy-dot-and-doh-...

Re:Improving DNS Privacy with Oblivious DoH by zachm0 on Tuesday December 08, 2020 @02:47PM (#25350374)
Yep! If you have a Raspberry Pi, look into Pihole. Some routers have this capability too.
Re:Improving DNS Privacy with Oblivious DoH by dhaavi on Tuesday December 08, 2020 @03:46PM (#25351124)
> bypasses any system resolvers configured on the host

With the Portmaster (https://github.com/safing/portmaster) we actually tackle this problem by notifying software (eg. Firefox) or blocking their connections, forcing them back to plain DNS, which we can redirect and handle. Take a look!

Re:Improving DNS Privacy with Oblivious DoH by hkt on Tuesday December 08, 2020 @10:56AM (#25346910)
Applications still have fallback though, right?

If so, I foresee blocks on DoH/etc to common resolvers like 8.8.8.8 and 1.1.1.1. I'll be blocking them at home on the assumption that I only want regular DNS lookups so I can point them to my own DNS server etc.

Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @11:06AM (#25347052)
Firefox and Chrome do yes, but none of these standards specify any kind of fall-back behaviour. There are no guarantees that any specific device or application needs to do that or how.

There is a cost to firewall rules like that as well. Who is going to maintain a list of all the IPs on the internet that are hosting DoH servers that could be used? What about the potentially more prolific proxies specified in this protocol enhancement? How does a network administrator keep all of those in sync with their edge networks? How does a home user?

Since DoH uses HTTPS there is no reason a service can't be multihomed on the same IP just like SNI allows multiple HTTPS servers on one IP. Would you be willing to block a legitimate website just so the applications on your network might fall-back to the name server you want them too?

Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Tuesday December 08, 2020 @12:14PM (#25348196)
You can snoop SNI and use that to block traffic, right? In another thread, someone suggested also stripping the keys for encrypted SNI from DNS queries which, when combined with a firewall that attempts to make a DoH query to every new SNI name it sees might potentially work.
Re:Improving DNS Privacy with Oblivious DoH by kelnos on Wednesday December 09, 2020 @01:06AM (#25355818)
For now. Encrypted SNI is in development and will eventually be used by devices and apps that want to do this sort of thing and hide what they're doing.
Re:Improving DNS Privacy with Oblivious DoH by fiddlerwoaroof on Wednesday December 09, 2020 @01:35AM (#25355952)
The solution to that is pretty simple. ESNI, I believe, requires encryption keys in DNS records: if you control DNS, you control ESNI. ECH might be harder to deal with, but you can always just block HTTPS connections you don’t want to support. Also, will some sort of certificate fingerprinting still work?
Re:Improving DNS Privacy with Oblivious DoH by hkt on Tuesday December 08, 2020 @06:08PM (#25352806)
Well, adblock lists exist, DNS block lists exist, this is just something along similar lines that can be tested and aggregated and distributed. Not a perfect solution, but pi-hole as a router or similar could do it.
Re:Improving DNS Privacy with Oblivious DoH by rsync on Tuesday December 08, 2020 @03:44PM (#25351104)
"If so, I foresee blocks on DoH/etc to common resolvers like 8.8.8.8 and 1.1.1.1. I'll be blocking them at home on the assumption that I only want regular DNS lookups so I can point them to my own DNS server etc."

I wish it were that easy but it's very predictable that google will start resolving DoH on plain old "google.com".

So will everyone else ... it's not going to be malicious.userhostile.resolver.samsung.com, it's just going to be samsung.com ... so you can block it but you'll be blocking more than just the resolver ...

Re:Improving DNS Privacy with Oblivious DoH by hkt on Tuesday December 08, 2020 @06:08PM (#25352817)
Grim thought, but surely they'd have to be serving from the same IPs?
Re:Improving DNS Privacy with Oblivious DoH by rsync on Tuesday December 08, 2020 @06:19PM (#25352941)
Right, but do you want to block all access to google.com ?

I, and many users on my home network, use that site a lot :)

Re:Improving DNS Privacy with Oblivious DoH by 0x426577617265 on Tuesday December 08, 2020 @11:01AM (#25346990)
Blocking traffic for known DoH services would be trivial. How about blocking unknown, how would you block that?
Re:Improving DNS Privacy with Oblivious DoH by dhaavi on Tuesday December 08, 2020 @03:48PM (#25351150)
Think out of the box: Just don't let the app connect to an IP it has not resolved a domain name for.

That's what we can do with the Portmaster (https://github.com/safing/portmaster). Check it out!

Re:Improving DNS Privacy with Oblivious DoH by 0x426577617265 on Wednesday December 09, 2020 @12:32PM (#25361148)
Thanks, I will check it out.
Re:Improving DNS Privacy with Oblivious DoH by salgernon on Tuesday December 08, 2020 @01:33PM (#25349468)
Trying to do content filtering on the kids chrome books for remote learning, I installed a pi-hole and was generally pleased with it. Then the kids (8 & 12) figured out to change the dns to cloudflare or google directly. I ended up having to add static routes on the router to block those paths.

(I need to block distraction sites during instruction time - otherwise it’s endless Minecraft videos while in zoom meetings...)

Re:Improving DNS Privacy with Oblivious DoH by remarkEon on Tuesday December 08, 2020 @01:56PM (#25349791)
Any "how to" recommendations for setting up something similar? I have a pi-hole but after reading this thread I feel like im severely under-utilizing it.
Re:Improving DNS Privacy with Oblivious DoH by specto on Tuesday December 08, 2020 @02:03PM (#25349872)
I have blocked 1.1.1.1 and 8.8.8.8 and noticed some devices behave very badly, often crashing or restarting. Debugging the issue, once I removed the firewall rule they behaved normally. Almost all of the affected devices were google related, Android TV for example.
Re:Improving DNS Privacy with Oblivious DoH by vetinari on Tuesday December 08, 2020 @03:22PM (#25350830)
You can also DNAT all port 53 traffic to your resolver. Devices will think they are talking to 8.8.8.8 or whatever, but in reality they will ask your resolver and your filtering will apply.

Your filtering can still break these devices.

Re:Improving DNS Privacy with Oblivious DoH by Spivak on Tuesday December 08, 2020 @08:42PM (#25354336)
This only works as long as DNS is both unauthenticated and unencrypted.
Re:Improving DNS Privacy with Oblivious DoH by vetinari on Wednesday December 09, 2020 @07:56AM (#25358004)
Which, at port 53, it is.

Obviously, it would work with DoT (853) only with cert verification disabled.

Re:Improving DNS Privacy with Oblivious DoH by yegle on Tuesday December 08, 2020 @11:02AM (#25347001)
Enterprise can disable DoH in Chrome using a group policy.
Re:Improving DNS Privacy with Oblivious DoH by vinay_ys on Tuesday December 08, 2020 @11:18AM (#25347258)
Enterprises can also disable direct outbound connections to anywhere. They can insist only way to access anything is via http proxies. You can do the same at home with a pi-hole. On iOS/MacOS you can install content/network filters. If a browser or app breaks these basic functionalities of Internet, then good luck to them.
Re:Improving DNS Privacy with Oblivious DoH by TrueDuality on Tuesday December 08, 2020 @11:14AM (#25347191)
You're right, that doesn't help with Apple devices though which has seen a huge market share increase with day to day users in the businesses that I interact with. Same thing goes for mobile devices, even those with enterprise management systems attached.

The options are simply not there for consistent management of your network.

Re:Improving DNS Privacy with Oblivious DoH by JMTQp8lwXL on Tuesday December 08, 2020 @11:47AM (#25347757)
Can't you do something analogous to editing your hosts file (but for name servers) and then re-centralize all of your apps using a single name server, which you can then control however you like?
Re:Improving DNS Privacy with Oblivious DoH by iso947 on Tuesday December 08, 2020 @05:28PM (#25352326)
No, because instead of setting your network to give out your DNs server to all of your devices, it’s ignored by the apps

Instead of setting your devices to use a dns server of your choice it’s ignored by the apps

Some apps allow you to configure them, so now you’re configuring 200 apps on 20 devices rather than just one dhcp setting.

(Oh and OSs have generally broken hosts files)

Re:Improving DNS Privacy with Oblivious DoH by JMTQp8lwXL on Tuesday December 08, 2020 @08:35PM (#25354270)
Sorry, what I was trying to say is: you know each app tries to use a certain DNS server. So, in your Rasp Pi, you route their DNS server to point your own (as you would with an /etc/hosts file), that way when DoH occurs, you control the final resolution.

What I'm suggesting isn't merely setting up the 'default' dns server. What I'm suggesting is 'cnaming' the name servers that apps attempt connecting to, to point elsewhere.

Re:Improving DNS Privacy with Oblivious DoH by iso947 on Wednesday December 09, 2020 @03:40AM (#25356591)
If you know the iP the DOH client uses you can intercept it. But you can’t spoof it without breaking TLS, which means deploying your own certificate

This general industry move will lead to more tls breaking proxies and more network interception. All because people don’t want to understand how a network and os work.

Making doh at the application later normal it moves the power towards the centralised advertising network and away from the individual. That the SV culture likes this is unsurprising.

Re:Improving DNS Privacy with Oblivious DoH by notwedtm on Tuesday December 08, 2020 @02:58PM (#25350519)
Giving the user the ability to expose these requests by sending an HMAC of the domain to a local resolver could help with the privacy portion, but still allow for custom routing based on context.
Re:Improving DNS Privacy with Oblivious DoH by crispyporkbites on Tuesday December 08, 2020 @11:02AM (#25347002)
why should DNS be handled at the system layer and not by applications? There's zero controls in place to stop this so I don't see why it's assumed that every application developer will want to use system defaults and not override it.
Re:Improving DNS Privacy with Oblivious DoH by gumby on Tuesday December 08, 2020 @11:07AM (#25347075)
> I don't see why it's assumed that every application developer will want to use system defaults

It's the user's machine not the application developer's.

Re:Improving DNS Privacy with Oblivious DoH by kibwen on Tuesday December 08, 2020 @11:21AM (#25347298)
And users get to decide which applications to install. Tunneling has been a thing for decades; likewise for malicious programs. Vigilance when installing programs on a networked device has always been and remains necessary.
Re:Improving DNS Privacy with Oblivious DoH by crispyporkbites on Tuesday December 08, 2020 @03:05PM (#25350626)
But it’s not under the users control if they install an app- there’s nothing hard that prevents the abuse. Now if the OS had a system wide / network level proxy that checks the correct DNS calls are getting made and overrides with a user chosen default, then you’d have something.

But we don’t, we just have a default

Re:Improving DNS Privacy with Oblivious DoH by j16sdiz on Tuesday December 08, 2020 @12:25PM (#25348382)
Because, DNS, like default gateway and ip address, are configured by DHCP? Zoned DNS server for intranet is very common.