gravity-sync
gravity-sync copied to clipboard
Implement syncing of `08-gs-lan.conf`/`GSLAN_CONF`?
Request:
Could you implement the syncing of the 08-gs-lan.conf
file/GSLAN_CONF
variable which is already present in the source code and config file?
Background:
I wanted to check in on the development/intentions of the file 08-gs-lan.conf
which is mentioned in the changelog for version 3.2.0. There it states that support for this file will be "coming within this release". Curious by this I decided to scour the source for a bit and found mentions of this file in proximity to the GSLAN_CONF
variable which was also added in 3.2.0. This variable seems to be a red herring for now however as it is actually never used in the code except for when defined. I'm personally in need of this functionality before I can deploy my second pihole as I have some custom local DNS resolution setup which needs additional dnsmasq.d
configuration.
Reasoning:
To me it feels as if this feature was forgotten somewhere. Therefore I wanted to add an official feature request to highlight it as there seems to previously have been a clear intention to implement it.
Hi,
Is this already implemented? I also have some custom local dns who I want to sync to me 2nd Pi-Hole.
Thx
@Kopernikus1979: Well as of right now there is nothing on master which provides this functionality. I have locally on my Pi4 a practically finished pull request. I have tried to contact @vmstan without success to try and figure out if him or someone else has implemented it already. The variable I mention in the issue seems to indicate the intention, but I wanted to know whether it was worth me putting time into when it could already be implemented somewhere else. Since I have received zero responses or input from @vmstan my work stagnated and has been dormant for some time now.
@Ga22be I may have found a workaround I will test it this evening, there's also a variable CNAME_CONF where you change the name of the CNAME file 05-pihole-custom-cname.conf who is located in etc/dnsmasq.d, so if I change the name to like for example 50-custom-hosts.conf it won't interfere with PiHole, dnsmasq will use the conf and it should sync (I hope), as a drawback you would loose the CNAME-sync functionality, but you can add you CNAMES in the custom file, a working solution like GS_CONF would be better ofcourse, so @vmstan can you have a look plz? Thx
@Ga22be Update: just tested my workaround and it seems te be working as expected, my 50-custom-hosts.conf is synchronized
So now waiting for the offical implementation :-)
It's still planned. I've just not had time to work on the script much recently.
Cool thx :-)
For anyone who is disappointed this isn't in Gravity Sync 4.
We'll get there. 😏
For anyone who is disappointed this isn't in Gravity Sync 4.
We'll get there. 😏
any eta for this? option is available at conf file but not working
I actually took the 08-gs-lan.conf reference out of 4.0, but I'm going to do it a little differently. Part of getting this implemented was separating the hashing files which I did in this version. Previously it all wrote to one.
Just out of curiosity what kind of settings would you want to keep in this file? I'm trying to sort through potential ways to make it more useful than just sync. (Or maybe that's all it needs to be.)
I actually took the 08-gs-lan.conf reference out of 4.0, but I'm going to do it a little differently. Part of getting this implemented was separating the hashing files which I did in this version. Previously it all wrote to one.
Just out of curiosity what kind of settings would you want to keep in this file? I'm trying to sort through potential ways to make it more useful than just sync. (Or maybe that's all it needs to be.)
I would use this for my local dns, I now I can use the local dns section in Pi-Hole but there I can't set TTL or multiple C-names. Now I'm using the workaround like described above.
I actually took the 08-gs-lan.conf reference out of 4.0, but I'm going to do it a little differently. Part of getting this implemented was separating the hashing files which I did in this version. Previously it all wrote to one.
Just out of curiosity what kind of settings would you want to keep in this file? I'm trying to sort through potential ways to make it more useful than just sync. (Or maybe that's all it needs to be.)
Like @Kopernikus1979 I'm looking to synchronise custom local dns-config files between my pihole instances.
Same here, I created separate files for custom forwards, local records (spoofed), spoofed public records and maybe some other stuff. These files are all in /etc/dnsmasq.d/.
@vmstan I'm also looking forward to being able to synchronize additional configuration files, where I want to define internal DNS records (beyond A,AAAA, and CNAME). I need to synchronize things such as PTR, SRV, TXT, and more which I manually add to a primary pihole and synchronize to my additional ones.
In the mean time, if I were to symply rsync the individual file, pushing from source to destination such as a new /etc/dnsmasq.d/99-self-managed.conf
, would that cause any issues with gravity-sync losing the config changes when it runs, if I had used rsync to push that file out to the other pihole instances?
I hadn't realized this is now the oldest open issue for this project. I just wanted to check in @vmstan and check wether work on this is planned for an upcoming release?
Regarding the required complexity of the feature you alluded to above. For me, Pihole is an amazing project, it's simple to set up and maintain and "just works". My only gripe with it has always been the fragility when updating or performing maintenance. Hence, I would really like to set up HA with inter-pihole sync. Enter gravity-sync. It allows me to sync several pihole instances, and gets me 95% percent of the way there. The only thing I can't use it for is to sync the configuration that is most important to me, my custom config. Here I have spoofed addresses, as well as DNS server overrides for internal domains. Note that I don't use Pihole to manage this internal DNS, the only purpose of Pihole in my network is simple ad-blocking and reduced tracking.
So for me, and seemingly the other commenters in this thread, there is no need for bells and whistles on this feature. At least for a first version. People might have different configurations in their custom files, but we all want to sync them. Me creating this thread stemmed from the tantalizing realization that there was already suggested configuration for this, which turned out to be a red herring. So don't feel you need to make this a big feature due to it's age. I'd say, keep it simple. At most allow us to specify several custom files which we can sync.
I hope this can bring some further clarity into what the request actually is.
I actually took the 08-gs-lan.conf reference out of 4.0, but I'm going to do it a little differently. Part of getting this implemented was separating the hashing files which I did in this version. Previously it all wrote to one.
Just out of curiosity what kind of settings would you want to keep in this file? I'm trying to sort through potential ways to make it more useful than just sync. (Or maybe that's all it needs to be.)
@vmstan No rush, just wanted to know if there is any ongoing work I could follow or if there is a timeline/roadmap for this? 🙂
What's the status on this?
I have a 03-custom-dns.conf
that should be synced, and going into this I sort of assumed that everything in LOCAL_DNSMASQ_DIRECTORY
would get synced to REMOTE_DNSMASQ_DIRECTORY
.
If there was a way to configure a list of files that would be synced, that'd be great but If anyone could advise on the best way to solve this for the time being, let me know!