Different response from WAN and LAN #5159
-
Is it possible to configure AdGuard DNS so that from the local network it gives different response than from public network? For example if I ping example.com from LAN I will get response with local IP of my website, but if I ping it from public IP, I will get public IP of my website |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Yep, it is, it's called DNS rewrite You find it under |
Beta Was this translation helpful? Give feedback.
-
It depends on where your AGH instance is located. If it is in your private home network, you can absolutely add rewrites for public addresses pointing to a machine in your own network. If your AGH instance is on a VPS somewhere on the internet, I would advise against using DNS rewrites as they can have unforeseen side effects. In this case, I would also ensure that only your devices can interact with your AGH instance and it is not a public one. I did that once and my VPS hoster got contacted by these guys » https://www.bsi.bund.de/EN/Home/home_node.html « essentially asking my hoster to let me know that what I'm doing might be a very bad idea. |
Beta Was this translation helpful? Give feedback.
-
So this is my solution, just add this to custom filtering rules ||example.com^$dnsrewrite=NOERROR;A;[host local address],client=[network address/subnet] ||example.com^$dnsrewrite=NOERROR;A;[host public address] |
Beta Was this translation helpful? Give feedback.
So this is my solution, just add this to custom filtering rules
||example.com^$dnsrewrite=NOERROR;A;[host local address],client=[network address/subnet]
||example.com^$dnsrewrite=NOERROR;A;[host public address]