Difference between revisions of "Ad-blocking"

From Amahi Wiki
Jump to: navigation, search
Line 18: Line 18:
 
= Fedora 19 =
 
= Fedora 19 =
  
Precusors - You'll need net-tools installed to use ifconfig
+
Precusors -  
 +
*You'll need net-tools installed to use ifconfig
 
  yum install net-tools
 
  yum install net-tools
 +
* This guide assumes your network interface is named p2p1. Check with ifconfig, and change this guide where neccessary.
  
 
==Get Ad List==
 
==Get Ad List==
Line 28: Line 30:
  
 
==Pixel Server==
 
==Pixel Server==
 +
 
* You need to download Pixelserv to the HDA:
 
* You need to download Pixelserv to the HDA:
 
  wget <nowiki>http://proxytunnel.sourceforge.net/files/pixelserv.pl.txt</nowiki>  
 
  wget <nowiki>http://proxytunnel.sourceforge.net/files/pixelserv.pl.txt</nowiki>  
Line 74: Line 77:
 
  exit 0
 
  exit 0
  
 +
* Change permissions
 +
chmod 755 /etc/init.d/pixelserv
  
  

Revision as of 17:11, 24 June 2015


Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


This section will document how to run your HDA as a network wide ad-blocking tool, utilising DNS redirects and a small pixel server.



Fedora 19

Precusors -

  • You'll need net-tools installed to use ifconfig
yum install net-tools
  • This guide assumes your network interface is named p2p1. Check with ifconfig, and change this guide where neccessary.

Get Ad List

Change DNSMasq config

Bind Apache to main IP address

Pixel Server

  • You need to download Pixelserv to the HDA:
wget http://proxytunnel.sourceforge.net/files/pixelserv.pl.txt 
  • Move and rename the Pixelserv binary:
mv pixelserv.pl.txt /usr/local/bin/pixelserv
  • Edit pixelserv using a file editing program of your choice
nano pixelserv
  • Change the IP address to a free one of your choice (eg. 192.168.1.99)
$sock = new IO::Socket::INET (  LocalHost => '0.0.0.0',

change to

$sock = new IO::Socket::INET (  LocalHost => '192.168.1.99',
  • Change permissions
chmod 755 /usr/local/pixelserv 

  • Create file /etc/init.d/pixelserv
nano /etc/init.d/pixelserv

and copy the following to it:
Note: Change the IP addresses, and you will need net-tools installed on the system as a precursor

#! /bin/sh
# /etc/init.d/pixelserv
#

# Carry out specific functions when asked to by the system
case "$1" in
   start)
     echo "Creating Interface "
     ifconfig p2p1:0 192.168.1.99
     echo "Starting pixelserv "
     /usr/local/bin/pixelserv &
     ;;
   stop)
     echo "Stopping script pixelserv"
     pkill -9 pixelserv &
     echo "Killing Interface "
     ifconfig p2p1:0 down
     ;;
   *)
     echo "Usage: /etc/init.d/pixelserv {start|stop}"
     exit 1
     ;;
esac
exit 0
  • Change permissions
chmod 755 /etc/init.d/pixelserv


Enjoy ad-free network on ALL devices!