Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Latest commit

 

History

History
36 lines (30 loc) · 1.12 KB

README.md

File metadata and controls

36 lines (30 loc) · 1.12 KB

PIA DNS Patcher

This script replaces the /etc/resolv.conf with the PIA DNS's to evade DNS leaking. It Overwrites or Appends your resolv.conf file.

Installation

You can call it from everywhere with an absolute path but for convenience make a symbolic link:

$ sudo ln -s $PWD/pia-patcher.py /usr/bin/pia-patcher

And then execute it:

$ pia-patcher
usage: pia-patcher.py [-h] [-o] [-f] [-a] [-b] [-r]

optional arguments:
  -h, --help       show this help message and exit
  -o, --overwrite  Overwrites the entire resolv.conf file.
  -f, --force      Forces overwrite. Use with -o
  -a, --append     Append resolv.conf instead of overwriting.
  -b, --backup     Only performs a backup of current resolv.conf
  -r, --restore    Restores previous backup
$ sudo pia-patcher.py -of
Warning: resolf.conf exists. Force overwriting.
Safety first: Making a backup.
Successfully backup resolv.conf
Proceeding to overwrite resolv.conf
DNS successfully patched.

Procedure

  • Makes a backup of the original resolv.conf
  • Replaces resolv.conf with a new resolv.conf file with PIA DNS addresses.
  • OR appends it if you choose to.