Quote from: GDixon on November 26, 2018, 05:20:07 am from chris42QuoteHow would this work on ipv6? I tried to mimic the NAT rules for ipv6, however then the DNS queries fail completelyExcellent question what would be the destination for IPv6 or what is the equivalent to 127.0.0.1 for IPv6?would it be ::1 for the loopback like 127.0.0.1 is for IPv4 loopback?Normally ::1 is the IPv6-localhost-Address. I must configure the IPv6-Address of the Interface (created an Alias) instead of ::1 in the NAT Rule and then it works. The clients resolves DNS-Records even if using his own IPv6-DNS-Servers.I tested this with my Android Phone. This has the App DNSChanger installed https://play.google.com/store/apps/details?id=com.frostnerd.dnschangerwith this App you can use other DNS-Server. With the IPv6 DNS NAT Rule you can farther resolve your own DNS-Records in the Override Tab from Unbound DNS. Normally when using a external DNS-Server you can't resolve internal DNS-Records.
from chris42QuoteHow would this work on ipv6? I tried to mimic the NAT rules for ipv6, however then the DNS queries fail completelyExcellent question what would be the destination for IPv6 or what is the equivalent to 127.0.0.1 for IPv6?would it be ::1 for the loopback like 127.0.0.1 is for IPv4 loopback?
How would this work on ipv6? I tried to mimic the NAT rules for ipv6, however then the DNS queries fail completely
QuoteNormally ::1 is the IPv6-localhost-Address. I must configure the IPv6-Address of the Interface (created an Alias) instead of ::1 in the NAT Rule and then it works. The clients resolves DNS-Records even if using his own IPv6-DNS-Servers.Hey p1n0ck10, could you go in to a little more detail regarding this?NAT redirects now use floating rules when the rule's running across multiply interfaces.You saying I'm going to have to create individual rules & aliases for each interfaces ipv6 address?Currently I've got a floating ipv6 NAT rule redirecting to ::1, and it's clearly not working.
Normally ::1 is the IPv6-localhost-Address. I must configure the IPv6-Address of the Interface (created an Alias) instead of ::1 in the NAT Rule and then it works. The clients resolves DNS-Records even if using his own IPv6-DNS-Servers.
Figured out a way to solve this issue. You can now safely use 127.0.0.1 in your NAT rule, instead of specifying the interface address (192.168.1.1 and other VLAN addresses).The culprit here is AdGuardHome; as the 127.0.0.1 setting works fine when using Unbound instead of AGH.Steps to FIX:S1) Goto AdGuardHome webpage, navigate to 'Setup Guide' pageS2) Note down all the IP addresses (you can ignore the https, tls, quic addresses if any)S3) Stop AdGuardHome serviceS4) Edit the AdGuardHome.yaml file manually (make a backup !) - file should be here... /usr/local/AdGuardHome/AdGuardHome.yamlS5) Find the bind_hosts: line in the fileS6) Remove the 0.0.0.0 and replace with all the IP addresses you wish to listene.g. Code: [Select]bind_hosts:- aaa.xxx.yyy.zzz- 127.0.0.1- ::1- fe80::1%lo0- 192.168.1.1- 192.168.10.1- 192.168.60.1- 10.0.0.1S7) Save the file S8) Enable AdGuardHome service again.S9) Goto AdGuardHome webpage, navigate to 'Setup Guide' pageS10) Compare these with Step2 - They should be the same as before...All set...You can now change your NAT rules to 127.0.0.1 instead of 192.168.1.1
bind_hosts:- aaa.xxx.yyy.zzz- 127.0.0.1- ::1- fe80::1%lo0- 192.168.1.1- 192.168.10.1- 192.168.60.1- 10.0.0.1
- 192.168.1.1 - 127.0.0.1 - ::1 - fd00:1:: - fe80::f690:edff:fe00:b3a1
bind_hosts: - 192.168.1.1 - 127.0.0.1 - ::1 - 'fd00:1::'
Did either of you find a solution for IPv6. I was having the exact same issue as dave.
Also, DNS does not use TCP (DoT uses TCP, but uses port 853 not 53). You can simplify and clean up the rules by applying it to UDP only or adjusting to your use case.
If I am incorrect please point me to resources.
So I fixed the issue with AdGuard not starting: it seems it has issues parsing specific IPv6. This works:Code: [Select] bind_hosts: - 192.168.1.1 - 127.0.0.1 - ::1 - 'fd00:1::'But, the problem remains, a DNS request to 1.1.1.1 for example is properly redirected to AdGuard, but the answer does not make it to the client initiating the request.In the packet capture done on the client (laptop) I can see what the reason is: the DNS request goes to 1.1.1.1, as expected, but the answer is coming from 192.168.1.1, which of course is then ignored.Does someone know how I can get the Source IP "faked" on the way back? Or is that not really possible?It's not really that important, it's in case I have a device on my home network with a hardcoded DNS server, but it would be useful in this case.