TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.48k stars 431 forks source link

A question not issue #584

Closed ChristoffBo closed 1 year ago

ChristoffBo commented 1 year ago

Hi,

How would i go about forwarding a dns query?

Say i want to forward all requests to www.google.com to my searxng instance on 10.0.0.100:8083?

thank you sir

ShreyasZare commented 1 year ago

Thanks for the post. You can do that by creating a conditional forwarding zone in Zones section for www.google.com and enter 10.0.0.100:8083 as the forwarder.

ChristoffBo commented 1 year ago

Hi Tried it, I Just get a The site cant be reached error: DNS_probe_finished_NXdomain

ShreyasZare commented 1 year ago

Test the domain name using the DNS Client tab on the DNS server web panel instead of testing it from the web browser. If you see NXDOMAIN as the RCODE in the DNS Client output then its the forwarder you have configured that is returning that answer which the DNS server is just caching and relaying.

ChristoffBo commented 1 year ago

Yea not working Rcode Server failure, what i am trying to do is that when ever anyone tries to open the google search engin i want it to open my SearXNG search engine. on that 10.0.0.100:8083 IP Address.

ChristoffBo commented 1 year ago

But i see if i add www.google.com to forward to my ip address i get ALOT of server failures so might not be a good idea.

thank you

ShreyasZare commented 1 year ago

Are you trying to do Man In The Middle (MITM) attack such that when a user enters www.google.com and gets redirected to another website? If yes then that is not possible without you generating a self signed root certificate and installing it on all your computers and mobile phones on your network.

The DNS server itself cannot do any kind of HTTP redirection. It can only return the IP address for your server. Rest everything you have to do by configuring the web server with your self signed certificate and installing that certificate on all clients.

ChristoffBo commented 1 year ago

Hi, thank you for that. Makes sense.

On Mon, 20 Mar 2023, 12:29 Shreyas Zare, @.***> wrote:

Are you trying to do Man In The Middle (MITM) attack such that when a user enters www.google.com and gets redirected to another website? If yes then that is not possible without you generating a self signed root certificate and installing it on all your computers and mobile phones on your network.

The DNS server itself cannot do any kind of HTTP redirection. It can only return the IP address for your server. Rest everything you have to do by configuring the web server with your self signed certificate and installing that certificate on all clients.

— Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/584#issuecomment-1475977089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOD37K7T3ECWALUSIJN4NKTW5AWPHANCNFSM6AAAAAAWA2TAHM . You are receiving this because you authored the thread.Message ID: @.***>