2

This question already has an answer here:

I want to have all DNS queries passing through tor.

How to set my default DNS to go through tor?

In other word I want to use the IP given by tor-resolve google.com instead of dig google.com.

marked as duplicate by Rui F Ribeiro, Eric Renouf, Jeff Schaller, Kusalananda, GAD3R Jan 5 '17 at 17:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

It is explained here.

For short, add DNSPort 9053 to the torrc and

server=127.0.0.1#9053
listen-address=127.0.0.1

to /etc/dnsmasq.conf

1

More information is needed. Many modern linux systems overwrite your /etc/resolv.conf automatically (resolvconf for example), and several run their own local caching dns (nscd for example). Without knowing what you are on and what is running, suggestions may fail.

However, here are two places to start:

Tor at Stackexchange

Configure Resolv.conf for Tor

EDIT: also see the response by j1088099-mvrht below.

Not the answer you're looking for? Browse other questions tagged or ask your own question.