2

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.

2 Answers2

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.

number9
  • 1,064
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