Algum tempo atrás eu precisava de algo similar. Eu usei um pacote chamado DNS-TCP-SOCK-PROXY
, que você pode encontrar nesta página do github . É descrito da seguinte forma:
A simple dns proxy to tunnel DNS requests over a socks proxy (for example, over ssh or Tor). This can come in handy when setting up transparent proxies.
Usage: ./dns-proxy [options]
e por último:
The configuration file should contain any of the following options (and ignores lines that begin with '#'):
socks_addr -- socks listener address
socks_port -- socks listener port
listen_addr -- address for the dns proxy to listen on
listen_port -- port for the dns proxy to listen on (most cases 53)
set_user -- username to drop to after binding
set_group -- group to drop to after binding
resolv_conf -- location of resolv.conf file to read from
log_file -- location to log to (should be /dev/null unless debugging).