Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

README

#
#  ______                                           ____   __  __  _____
# |  __  |                         @               |    \ |  \ | ||  ___| (TM)
# | _____|.------. .-----. .-----. _ -. .-.------. | |\  ||   \| ||___  |
# |  |    |  __  ||__  --'|__  --'| |\ Y /| _--__|_| |/  ||      || \_| |
# |__|    |____|_||______||______||_| \_/ |_______/|____/ |__|\__||_____|
#
#

# Usage
########

# passivedns
root@localhost: ./passivedns -i eth1 -l /var/log/passivedns.log

# pdns2db.pl
root@localhost: apt-get install libdatetime-perl
(Redhat/CentOS: yum install perl-DateTime)

First you need to add a user to the mysql db:

mysql> GRANT USAGE ON *.* TO 'pdns'@'localhost' IDENTIFIED BY 'pdns';
mysql> GRANT SELECT,CREATE,INSERT,UPDATE ON pdns.* TO 'pdns'@'localhost';
mysql> flush privileges;
mysql> CREATE DATABASE pdns;

Then you need to start up pdns2db.pl

root@localhost: perl pdns2db.pl --file /var/log/passivedns.log

# Old School archiving of passivedns.log
# While passivedns is running;
$ mkdir /var/log/passivedns-archive/
$ mv /var/log/passivedns.log /var/log/passivedns-archive/
$ gzip -S ".`date +%s`.gz" /var/log/passivedns-archive/passivedns.log 
# Searching
$ zgrep "gamelinux.org" /var/log/passivedns-archive/*

Something went wrong with that request. Please try again.