[SOLVED]Ipset auto start?

how can I start an ipset at router start (preferably before dnsmasq and network starts )
I am trying to use ipset in dnsmasq and iptable.
I can use firewall custom rules to make sure the ipset get loading there and I have added to "/etc/dnsmasq.conf" the ipset domains. but I need to first start the ipset with.
"ipset create fbar iphash"
how do I automate this part?
and If I am not wring I think this needs to be done before dnsmasq initialization so that the resolved IPs in the fbar get added to ipset listed.

so even if I create the ipset after reboot the I have to restart dnsmasq again to add the ips to set.
and also restart the firewall so the rules get added.

maybe adding the ipset command to firewall custom command too?

Not possible, since you have to resolve hostnames to IPs. I'm not sure why you believe that you must initialize the ipset before dnsmasq (unless you're planning to block the hostnames too).

You can place the ipset in Startup (/etc/rc.local).

I added the ipset to start of custom firewall rules and it worked.

about the above post:
ipset can be used to add ips of domains to iptable.
so I create a hashtable in ipset and and add the name of that ipset to dnsmasq,conf with domains I want to be under that set.
as dnsmasq gets this domains requested by clients in lan (and not before) it will add them to ipset.