Coder Social home page Coder Social logo

adsuck's Introduction

=== Installation ===

The code was written on OpenBSD and the port contains the installation procedure. For non OpenBSD installation it needs to be done by hand.

There are 2 methods of using adsuck:
    1) as a local resolver for the road-warrior
    2) as a perimeter resolver to protect local networks

	Method 1
	- Make and install adsuck somewhere that is available at boot
	- Create a directory to chroot adsuck with 755 permissions (e.g. /var/adsuck)
	- Create a _adsuck user and make its home directory the chroot directory
	- Create a _adsuck group
	- Copy the blacklist files (Hosts.pub and hosts.small) to the chroot directory
	- Modify the dhclient script to not overwrite /etc/resolv.conf and instead write that file to the chroot directory
	- Also modify the dhclient script to send SIGHUP to the adsuck daemon whenever it gets a new nameserver
	- Modify the /etc/resolv.conf file to only one line reading: nameserver 127.0.0.1
	- Add adsuck somewhere as a daemon so that it runs during boot (do this after dhclient and syslogd)
	- Run adsuck, for example, with the following parameters: -c /var/adsuck -f /resolv.conf /hosts.small /Hosts.pub

	Note: adsuck runs in a chroot environment and the above example would require 3 files in /var/adsuck; namely Hosts.pub, hosts.small and resolv.conf. Also note that in this example the dhclient script needs to overwrite /var/adsuck/resolv.conf every time it gets a new nameserver AND it has to send SIGHUP to the adsuck daemon to reread that file.

	Method 2
	- Make and install adsuck somewhere that is available at boot
	- Create a directory to chroot adsuck with 755 permissions (e.g. /var/adsuck)
	- Create a _adsuck user and make its home directory the chroot directory
	- Create a _adsuck group
	- Copy the blacklist files (Hosts.pub and hosts.small) to the chroot directory
	- Create a resolv.conf file that contains your actual resolver information
	- Add adsuck somewhere as a daemon so that it runs during boot (do this after dhclient and syslogd)
	- Run adsuck, for example, with the following parameters: -l 192.168.0.1 -c /var/adsuck -f /resolv.conf /hosts.small /Hosts.pub

	Note: this has to be done on whichever machine runs a valid nameserver for that network. If there is a local nameserver make it listen on, for example, port 54 of localhost and make the adsuck resolv.conf point there. 


=== Compiling ===

OpenBSD:
	make obj
	make depend
	make all

Linux:
	gmake -f GNUmakefile adsuck

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.