<div dir="ltr"><div dir="ltr">Thanks Geert,<div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 23, 2022 at 5:28 PM Geert Stappers via Dnsmasq-discuss <<a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">dnsmasq-discuss@lists.thekelleys.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Nov 23, 2022 at 01:47:27PM +0800, Feng Shao wrote:<br>
> There are a bunch of machines in our lab, and we normally don't have DNS<br>
> records configured for them, only accessing by IP. In order to ssh to them<br>
> with key auth, I have a config in my .ssh/config like<br>
> <br>
> Host *.mylab<br>
> User root<br>
> IdentityFile ~/.ssh/<a href="http://id_rsa.work" rel="noreferrer" target="_blank">id_rsa.work</a><br>
> <br>
> and I have some "address=/<a href="http://123.123.123.123" target="_blank">123.123.123.123</a>.mylab/<a href="http://123.123.123.123" rel="noreferrer" target="_blank">123.123.123.123</a>" line in<br>
> dnsmasq.conf. The problem here is I need to add an entry whenever a new IP<br>
> comes.<br>
<br>
So share with us a more representive sample set of such entries.<br></blockquote><div>In dnsmasq.conf, I have lines like:</div><div>address=/<a href="http://123.123.123.123/" target="_blank">123.123.123.123</a>.mylab/<a href="http://123.123.123.123/" rel="noreferrer" target="_blank">123.123.123.123</a></div><div>address=/<a href="http://123.123.123.123/" target="_blank">123.123.123.12</a>4.mylab/<a href="http://123.123.123.123/" rel="noreferrer" target="_blank">123.123.123.12</a>4<br></div><div>address=/<a href="http://123.123.123.123/" target="_blank">123.123.123.12</a>5.mylab/<a href="http://123.123.123.123/" rel="noreferrer" target="_blank">123.123.123.12</a>5<br></div><div>address=/<a href="http://123.123.123.123/" target="_blank">123.123.123.12</a>6.mylab/<a href="http://123.123.123.123/" rel="noreferrer" target="_blank">123.123.123.12</a>6<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
> Can this configuration be dynamically? For example,<br>
> "address=/*.mylab/somecmd %1", where "somecmd" is a external command and %1<br>
> will be replaced by the name in A/AAAA request. So that for any DNS request<br>
> to *.mylab, dnsmasq invoke this external command and pass the name as<br>
> argument, the output of external command, which will be interpreted as<br>
> IPv4/IPv6 addr then responsed to client?<br>
<br>
Advice: Use an open question to start a discussion.<br></blockquote><div>The requirement is I want to ssh any host in my lab without password, I am open to any other solution. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
<br>
<br>
P.S.<br>
Welcome to dnsmasq mailinglist<br>
-- <br>
Silence is hard to parse<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div></div>