Unverified Commit a91b1e81 authored by MegaS0ra's avatar MegaS0ra Committed by GitHub
Browse files

Update to explain the no argument option

parent a894d12a
......@@ -13,7 +13,14 @@ GRANT USAGE ON *.* TO 'dns'@'%' with MAX_QUERIES_PER_HOUR 0 MAX_UPDATES_PER_HOUR
GRANT SELECT ON psa.dns_zone TO 'dns'@'%';
FLUSH PRIVILEGES;
````
If you want to be more restrictive, you can specify the IP address instead of % in the SQL query.
If you want to be more restrictive, you can specify the IP address instead of % in the SQL query. Here's a "bash version" :
````bash
echo "CREATE USER 'dns'@'IP.IP.IP.IP' identified by 'SomeRandomPasswordYouChoose';" | plesk db
echo "GRANT USAGE ON *.* TO 'dns'@'IP.IP.IP.IP' with MAX_QUERIES_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_USER_CONNECTIONS 0;" | plesk db
echo "GRANT SELECT ON psa.dns_zone TO 'dns'@'IP.IP.IP.IP';" | plesk db
echo "FLUSH PRIVILEGES;" | plesk db
````
Still on the master server, from Plesk, you need to add the IP of your slave server to the "Common Allow Zone Transfer ACL" :
Tools & Settings > DNS Template > Transfer Restrictions Template > Add Address
......@@ -34,6 +41,8 @@ Execute the script with the IP of the master server as argument :
````
At each execution, the script will check if there are new domains (or removed domains) on the specified host, in comparison to the actual slaves zones, and add/remove these domains.
If the script is executed without any argument, it will do the check for the masters already added.
This script does the job only when executed, so you may want to setup a cron job to execute it.
Also, if you want to execute this script for different master servers, you may run it in a loop for each IP :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment