[Dnsmasq-discuss] Using a variable in the address option in dnsmasq.conf

Steve Lloyd steve.lloyd at gmail.com
Fri Mar 2 18:56:45 GMT 2018


If I update an external conf file will dnsmasq read in the changes in real
time or do I have to restart it?

On Fri, Mar 2, 2018 at 10:39 AM <wkitty42 at gmail.com> wrote:

> On 03/02/2018 07:46 AM, Petr Menšík wrote:
> > and then generate your file any way you need. For example in bash
> >
> > echo "# Autogenerated file, do not edit by hand" >
> > /etc/dnsmasq.d/blocked.conf
> > for DOMAIN in 2o7.net 2mdm.net
> >    do echo "address=/$DOMAIN/$MYIP" >> /etc/dnsmasq.d/blocked.conf
> > done
>
>
> even better would be...
>
>
> echo "# Autogenerated file, do not edit by hand" >
> /etc/dnsmasq.d/blocked.conf
> for DOMAIN in 2o7.net 2mdm.net facebook.com fbcdn.net fbcdn.com
> facebook.net
>    do echo "server=/$DOMAIN/" >> /etc/dnsmasq.d/blocked.conf
> done
>
>
> so dnsmasq will return NXDOMAIN for blocked domains :evilBOFHgrin:
>
>
> --
>   NOTE: No off-list assistance is given without prior approval.
>         *Please keep mailing list traffic on the list unless*
>         *a signed and pre-paid contract is in effect with us.*
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180302/e59b9295/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list