DNS Forwarding and DNS Redirecting - retain client information for AdGuardHome

Hello!
I set up my router (192.168.1.1) to forward all DNS queries to AGH (192.168.0.250). I've also added Port Forwarding rules to prevent i.e. my Chromecast from not using AGH. This works really well:

dnsmasq

config dnsmasq
        ...
        list server '192.168.0.250#53'

Port Forwarding:

config redirect 'adguardhome_lan_dns_53'
        option src 'lan'
        option proto 'tcp udp'
        option src_dport '53'
        option target 'DNAT'
        option name 'Adguard Home LAN'
        option dest_port '53'
        option dest 'lan'
        option dest_ip '192.168.1.1'
        option src_ip '!192.168.0.250'

However, this of course only shows 1 client in AGH (my router).

Can I preserve client IPs? I tried port forwarding directly to my AGH instead of the router which then of course shows the correct clients, but it breaks some services such as Netflix (it just says I'm offline...).

Change dest_ip to 0.250 and the appropriate dest zone.

Because you have set it up that way. Use DHCP option 6 to pass AGH DNS ip to your clients and they will talk to AGH directly and thus show properly.

Keep your rule to enforce "sneaky" dns requests via dns redirection.

if you haven't already read my manual install thread its worth a read.

2 Likes

I tried that, but Chromecast and Netflix then say No internet connection. Redirect to the router + DNS forwardings works however.

Is AGH configured to reply to all networks or only to queries from 192.168.0.0/24?

1 Like