Blacklist Configuration File Clarification in README.md
mygeek911 opened this issue · 3 comments
It's possible I am misunderstanding the instructions, and I'm hoping to get some clarification.
When I globally include a host/domain or add a new source, is it supposed to appear in the /config/user-data/blacklist.cfg file? It never does for me although if I try and add it again, it shows that it already exists. If I were to reboot the router without it showing in the file, will it remain?
Also, at what point does the blacklist.cfg file get backed up? Is it only when the package is removed? I ask since the instructions mention deleting the file, and I couldn't tell if it was because the blacklisting was disabled or the entire package deleted, or if it backed it up at some other time. After I've added a new host/domain or a new source, the blacklist.cfg file hasn't been backed up.
I appreciate the efforts you've made with this program! Thanks.
For your first question: When I globally include a host/domain or add a new source, is it supposed to appear in the /config/user-data/blacklist.cfg file?
No, this file can be created by yourself to manually configure blacklist and use the -f switch.
i.e.
/config/scripts/update-dnsmasq -v -f /config/user-data/blacklist.cfg
As long as this file is kept in /config/user-data, then it will persist across router upgrades.
If you're using the manual configuration, then you can also set up a cron job to run it:
sudo -i
crontab -e
1 0 * * * /config/scripts/update-dnsmasq -v -f /config/user-data/blacklist.cfg >/dev/null 2>&1
For you second question: Also, at what point does the blacklist.cfg file get backed up? Is it only when the package is removed?
Does the install backup my blacklist configuration before deleting it?
During package installation or removal, the Edgerouter's blacklist configuration is deleted. A backup is automatically made, see the documentation here
Also, at what point does the blacklist.cfg file get backed up? Is it only when the package is removed? I ask since the instructions mention deleting the file, and I couldn't tell if it was because the blacklisting was disabled or the entire package deleted, or if it backed it up at some other time.
No files are deleted in /config or its subdirectories, except /config/script/ which contains the update-dnsmasq binary file.
After I've added a new host/domain or a new source, the blacklist.cfg file hasn't been backed up.
All committed and saved changes are stored in the Edgerouter's configuration file /config/config.boot.
blacklist.cfg is a file (name is arbitrary) you create yourself. The date stamped *.cfg files in /config/user-data/ are backups made during package installation or removal.
Thank you!