Skip to content

pihole-sync is a tool for synchronizing local dns and cname records from master-pihole to slave-pihole server.

License

Notifications You must be signed in to change notification settings

JoNy202/pihole-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pihole-sync

pihole-sync is a tool for synchronizing local dns and cname records from master-pihole to slave-pihole server.

Installation

For master-pihole server:

  1. Copy files from the folder named 'server' to the master-pihole server.
  2. Write the {secret key} in the file '/var/www/sync.server.php'.
  3. Create a link for the file '/etc/lighttpd/20-pihole-sync.conf' with command:
cd /etc/lighttpd/conf-enabled && \
ln -s ../conf-available/20-pihole-sync.conf 20-pihole-sync.conf
  1. Restart lighttpd with command (Debian example):
systemctl restart lighttpd.service
  1. Check server by opening the link in the browser. The result should be 'ok:{sha256-hash}'
http://{master-pihole-ip}/sync/{secret-key}/dns/hash

For slave-pihole server:

  1. Copy files from the folder named 'client' to the slave-pihole server.
  2. Write {master-pihole-ip} and {secret key} (same as master-pihole) in the file '/root/sync.client.php'.
  3. Check client by executing the command:
/usr/bin/php /root/sync.client.php
  1. create cron job:
*/30 * * * * /usr/bin/php /root/sync.client.php > /dev/null 2>&1

About

pihole-sync is a tool for synchronizing local dns and cname records from master-pihole to slave-pihole server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages