News for hackers. Stuff that matters.
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.