GithubHelp home page GithubHelp logo

wi1dcard / dns-tcp-socks-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jtripper/dns-tcp-socks-proxy

0.0 1.0 0.0 320 KB

Simple daemon to tunnel DNS requests over SOCKS

License: GNU General Public License v2.0

Shell 9.22% C 90.78%

dns-tcp-socks-proxy's Introduction

DNS SOCKS Proxy

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.

It chooses a random DNS server for each request from the file "resolv.conf" which is a newline delimited list of DNS servers.

The daemon must be run as root in order for it to bind to port 53.

Usage

Usage: ./dns-proxy [options]

With no parameters, the configuration file is read from 'dns_proxy.conf'.

  • -n -- No configuration file (socks: 127.0.0.1:9050, listener: 0.0.0.0:53).
  • -h -- Print this message and exit.
  • config_file -- Read from specified configuration file.

Configuration

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).

Any non-specified options will be set to their defaults:

  • socks_addr = 127.0.0.1
  • socks_port = 9050
  • listen_addr = 0.0.0.0
  • listen_port = 53
  • set_user = nobody
  • set_group = nobody
  • resolv_conf = resolv.conf
  • log_file = /dev/null

Installation

On Arch linux, the dns proxy can be installed from the AUR at: https://aur.archlinux.org/packages/tcpdnsproxy/.

wget https://aur.archlinux.org/packages/tc/tcpdnsproxy/PKGBUILD
makepkg
sudo pacman -U tcpdnsproxy-20130128-1-any.pkg.tar.xz

# edit /etc/dns_proxy/dns_proxy.conf as necessary
sudo systemctl start tcpdnsproxy

# to autorun on put run:
sudo systemctl enable tcpdnsproxy

On other distributions:

git clone https://github.com/jtRIPper/dns-tcp-socks-proxy.git
cd dns-tcp-socks-proxy
make

# edit dns_proxy.conf as necessary
./dns_proxy

After running the daemon, the system should be configured to use the proxy automatically.

Credits

(c) jtRIPper 2012

http://blackhatlibrary.net/

dns-tcp-socks-proxy's People

Contributors

thuovila avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.