Hi, many thanks for this HowTo, works flawlessly for me.Would it be possible to add a similar Redirect rule for NTP service port 123 so that Opnsense NTP server will only be used?
In the past I excluded my wifes smartphone (IP by alias) from being redirected because she didnt want to use (ad-)filtered DNS servers. Just edit the forward rule and add the IP/alias negated ( ! ) to the source.
When configure that device with static ip and then add the dns you like in the " DNS servers" field. Have not tried that myself while I use adguard home for all devices / dns.
Redirecting DNS to 127.0.0.1 seem to fail for me:Whereas a redirect to the relevant LAN/VLAN's gateway (e.g. 192.168.1.1:53) works, a redirect to 127.0.0.1:53 does not:Quotenslookup www.ft.com ns2.google.com.DNS request timed out. timeout was 2 seconds.Server: UnKnownAddress: 216.239.34.10DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.*** Zeitüberschreitung bei Anforderung an UnKnown.The DNS request shows up in my (adguard home) logs, but apparently the response to my client is faulty.If redirecting to 192.168.1.1, the redirect works and the client "does not notice": Quotenslookup www.ft.com ns2.google.com.Server: ns2.google.comAddress: 216.239.34.10Nicht autorisierende Antwort:Name: ft2.map.fastly.netAddresses: 151.101.2.209 151.101.66.209 151.101.130.209 151.101.194.209Aliases: www.ft.comWhat could be the reason?Redirecting to 127.0.0.1 would be favourable as I could apply it globally to all local LAN/VLAN/VPN interfaces, whereas redirecting to a gateway address would require individual rules for each interface (bleh!).
nslookup www.ft.com ns2.google.com.DNS request timed out. timeout was 2 seconds.Server: UnKnownAddress: 216.239.34.10DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.*** Zeitüberschreitung bei Anforderung an UnKnown.
nslookup www.ft.com ns2.google.com.Server: ns2.google.comAddress: 216.239.34.10Nicht autorisierende Antwort:Name: ft2.map.fastly.netAddresses: 151.101.2.209 151.101.66.209 151.101.130.209 151.101.194.209Aliases: www.ft.com
Quote from: abulafia on September 16, 2021, 06:42:14 pmThanks but that's not it - the option is unchecked..Probably more of a firewall issue I guess?Did you ever solve this issue?
Thanks but that's not it - the option is unchecked..Probably more of a firewall issue I guess?
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
Quote from: abulafia on September 11, 2021, 09:45:23 pmRedirecting DNS to 127.0.0.1 seem to fail for me:Whereas a redirect to the relevant LAN/VLAN's gateway (e.g. 192.168.1.1:53) works, a redirect to 127.0.0.1:53 does not:Quotenslookup www.ft.com ns2.google.com.DNS request timed out. timeout was 2 seconds.Server: UnKnownAddress: 216.239.34.10DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.DNS request timed out. timeout was 2 seconds.*** Zeitüberschreitung bei Anforderung an UnKnown.The DNS request shows up in my (adguard home) logs, but apparently the response to my client is faulty.If redirecting to 192.168.1.1, the redirect works and the client "does not notice": Quotenslookup www.ft.com ns2.google.com.Server: ns2.google.comAddress: 216.239.34.10Nicht autorisierende Antwort:Name: ft2.map.fastly.netAddresses: 151.101.2.209 151.101.66.209 151.101.130.209 151.101.194.209Aliases: www.ft.comWhat could be the reason?Redirecting to 127.0.0.1 would be favourable as I could apply it globally to all local LAN/VLAN/VPN interfaces, whereas redirecting to a gateway address would require individual rules for each interface (bleh!).Quote from: TarrasQ on November 20, 2021, 03:32:33 amQuote from: abulafia on September 16, 2021, 06:42:14 pmThanks but that's not it - the option is unchecked..Probably more of a firewall issue I guess?Did you ever solve this issue?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