sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

Enhancement: Ability to add custom lines to dnsmasq in Minirouter #1446

Open mkunz7 opened 3 years ago

mkunz7 commented 3 years ago

It would be nice if I could add lines to minimega dnsmasq configs

For example to redirect .test.com to 1.0.0.1 and .test2.com to 2.0.0.1 I add this to /etc/dnsmasq.conf:

address=/test.com/1.0.0.1;address=/test2.com/2.0.0.1
mkunz7 commented 3 years ago

There have been quite a few use cases this has come into play and as a workaround I've been using miniccc to add the lines and restart the service.

Namely:

Redirecting certain domains to specific dns servers

server=/test.com/3.0.0.1
server=/test2.com/4.0.0.1

Adding cname records

domain=test.com
cname=www.test.com,test.com

Maybe something like router r0 dnsmasq-append server=/test.com/3.0.0.1;server=/test2.com/4.0.0.1