Great change - simplifies the domains' addition / removal process. What is the impact on the existing nat-start statements format?
Shouldn't impact any existing nat-start entries. But one item worth pointing out is how I handle the dnsmasq.conf.add entry.
An example VPN Bypass client 2 nat-start entry will be:
Code:
sh /jffs/scripts/x3mRouting/x3mRouting.sh 2 0 MYSET dnsmasq_file=/jffs/scripts/myfiles
If the 'dnsmasq_file=' parm is specified, I first remove the dnsmasq entry for the IPSET list in
dnsmasq.conf.add before creating the new one. For example, let's say I have a list of files in the domain_file:
Code:
domain1.com
domain2.com
domain3.com
The dnsmasq.conf.add entry will be
Code:
ipset=/domain1.com/domain2.com/domain3.com/MYDOMS
If you remove domain3.com from the file, the dnsmasq.conf.add now becomes
Code:
ipset=/domain1.com/domain2.com/MYDOMS
In the other methods, the domain name is appended in dnsmasq.conf.add to allow people to append domains.
Code:
ipset=/domain1.com/domain2.com/domain3.com/IPSETLIST
ipset=/domain4/IPSETLIST
I am considering changing this so only one entry in dnsmasq.conf.add is allowed and a subsequent entry would override the existing one.
Two commands people may want to become familiar with when using the
dnsmasq_file parm are the
ipset del and
ipset flush command.
ipset flush SETNAME command will empty the contents of an IPSET list. For example, If I remove a domain name from the file, the IPv4 address will still in the IPSET list and the save/backup file. Knowing what IPv4 address to delete is the difficult part. The command
ipset flush [ipset list] will empty the IPSET list in memory. dnsmasq will now start loading the IPv4 addresses dynamically using the domains specified. The save/restore file will get updated from the 2 am cron job.
If one knows the IPv4 addrress of the domain that was removed, type
ipset del SETNAME ENTRY, for example
Code:
ipset del MYLIST 123.24.7.89