<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Any command line parameters are accepted as options in config
      file without leading --. max-ttl=x can be used just like
      local-ttl=x. dnsmasq.conf does not include all supported options,
      just add it anywhere you want. To the beginning or to the end or
      to /etc/dnsmasq.d/ttl.conf, does not matter.</p>
    <p>It is supported when it is in the manual page. Just omit -- in
      conf file.</p>
    <p>Cheers,<br>
      Petr<br>
    </p>
    <div class="moz-cite-prefix">On 10/18/21 10:16, OMair Siddiquii
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:SI2PR06MB4377F123974827CEE85BEC31A9BC9@SI2PR06MB4377.apcprd06.prod.outlook.com">
      <div>
        ok, I have installed dnsmasq version 2.76 on centOS 7. what will
        be the command to execute to configure max ttl? I see in the
        dnsmasq.conf file there is only the local-ttl option.</div>
      <div>
        <br>
      </div>
      <div>
        <img data-outlook-trace="F:1|T:1"
          src="cid:part1.GLsOnMls.ZhsQ66XG@redhat.com" class=""><br>
      </div>
      <div>
        <br>
      </div>
      <div>
        <img data-outlook-trace="F:1|T:1"
          src="cid:part2.evhU6X3R.2R8JZNYd@redhat.com" class=""><br>
      </div>
      <div>
        <div>
          <br>
        </div>
        <hr tabindex="-1">
        <div id="divRplyFwdMsg" dir="ltr"><b>From:</b> Petr Menšík
          <a class="moz-txt-link-rfc2396E" href="mailto:pemensik@redhat.com"><pemensik@redhat.com></a><br>
          <b>Sent:</b> Thursday, October 14, 2021 1:32 AM<br>
          <b>To:</b> OMair Siddiquii
          <a class="moz-txt-link-rfc2396E" href="mailto:omairsiddiqui55@hotmail.com"><omairsiddiqui55@hotmail.com></a>;
          <a class="moz-txt-link-abbreviated" href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">dnsmasq-discuss@lists.thekelleys.org.uk</a>
          <a class="moz-txt-link-rfc2396E" href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"><dnsmasq-discuss@lists.thekelleys.org.uk></a><br>
          <b>Subject:</b> Re: [Dnsmasq-discuss] How to Add max-ttl in
          DNSMASQ
          <div> </div>
        </div>
        <div>
          <p>Hello Omair,</p>
          <p>dnsmasq 2.48 in RHEL6 is quite old and does not contain
            support for max-ttl. That was added in dnsmasq 2.53 and
            would be present in RHEL7 if you can consider upgrade. Even
            that version is receiving only important updates and is also
            rock-stable. I am afraid no supported parameter has the same
            effect. Only local-ttl and neg-ttl are supported for
            adjusting TTL in 2.48.<br>
          </p>
          <p>Other option would be building your own build of dnsmasq,
            where you could build something more recent. RHEL6 would not
            receive any updates except critical bugs and security
            issues, it won't change in the distribution.<br>
          </p>
          <p>Best Regards,<br>
            Petr<br>
          </p>
          <div class="x_moz-cite-prefix">On 10/13/21 17:40, OMair
            Siddiquii wrote:<br>
          </div>
          <blockquote type="cite">
            <div>This is the max-ttl that I have configured manually in
              the config file.</div>
            <div>when I tried to ran a command with -T --max-ttl it
              didn't work.</div>
            <div><br>
            </div>
            <div>]# sed -e '56!d' /etc/dnsmasq.conf<br>
              max-ttl=30<br>
            </div>
            <div><br>
            </div>
            <div>OS im using is Red Hat Enterprise Linux Server release
              6.10 (Santiago)</div>
            <div>
              <div><br>
              </div>
              <hr tabindex="-1">
              <div id="x_divRplyFwdMsg" dir="ltr"><b>From:</b>
                Dnsmasq-discuss <a class="x_moz-txt-link-rfc2396E"
                  href="mailto:dnsmasq-discuss-bounces@lists.thekelleys.org.uk"
                  moz-do-not-send="true">
<dnsmasq-discuss-bounces@lists.thekelleys.org.uk></a> on behalf of
                Petr Menšík <a class="x_moz-txt-link-rfc2396E"
                  href="mailto:pemensik@redhat.com"
                  moz-do-not-send="true">
                  <pemensik@redhat.com></a><br>
                <b>Sent:</b> Tuesday, October 12, 2021 2:24 PM<br>
                <b>To:</b> <a class="x_moz-txt-link-abbreviated
                  moz-txt-link-freetext"
                  href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"
                  moz-do-not-send="true">
                  dnsmasq-discuss@lists.thekelleys.org.uk</a> <a
                  class="x_moz-txt-link-rfc2396E"
                  href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"
                  moz-do-not-send="true">
                  <dnsmasq-discuss@lists.thekelleys.org.uk></a><br>
                <b>Subject:</b> Re: [Dnsmasq-discuss] How to Add max-ttl
                in DNSMASQ
                <div> </div>
              </div>
              <div>
                <p>Please report what is on line 56.</p>
                <p>Following command would print just that:<br>
                </p>
                <p>sed -e '56!d' /etc/dnsmasq.conf</p>
                <p>I doubt that is about max-ttl option. Are you still
                  using RHEL6 (or derivate) for some reason? I thought
                  every option is supported in more recent versions. I
                  would like to know what option were supported in the
                  old but is not in current version. Please Share.</p>
                <p>Cheers,<br>
                  Petr<br>
                </p>
                <div class="x_x_moz-cite-prefix">On 10/11/21 19:41,
                  OMair Siddiquii wrote:<br>
                </div>
                <blockquote type="cite">
                  <div>
                    <ol>
                      <li><span>I stopped DNSMASQ service.</span></li>
                      <li><span><span>I ran "dnsmasq --max-ttl=30"</span></span></li>
                      <li>Got this error "dnsmasq: bad command line
                        options: try --help<span>"</span></li>
                      <li><span>Tried to manually add
                          max-ttl=<time> in dnsmasq.conf</span></li>
                      <li><span>Got this error "Starting dnsmasq:
                          <div>dnsmasq: bad option at line 56 of
                            /etc/dnsmasq.conf <span>[FAILED]</span><span>"</span></div>
                        </span></li>
                    </ol>
                  </div>
                  <div>
                    <div><br>
                    </div>
                    <hr tabindex="-1">
                    <div id="x_x_divRplyFwdMsg" dir="ltr"><b>From:</b>
                      Dnsmasq-discuss <a
                        class="x_x_moz-txt-link-rfc2396E"
                        href="mailto:dnsmasq-discuss-bounces@lists.thekelleys.org.uk"
                        moz-do-not-send="true">
<dnsmasq-discuss-bounces@lists.thekelleys.org.uk></a> on behalf of
                      Matus UHLAR - fantomas via Dnsmasq-discuss
                      <a class="x_x_moz-txt-link-rfc2396E"
                        href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"
                        moz-do-not-send="true">
                        <dnsmasq-discuss@lists.thekelleys.org.uk></a><br>
                      <b>Sent:</b> Monday, October 11, 2021 9:25 PM<br>
                      <b>To:</b> <a class="x_x_moz-txt-link-abbreviated
                        x_moz-txt-link-freetext moz-txt-link-freetext"
                        href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"
                        moz-do-not-send="true">
                        dnsmasq-discuss@lists.thekelleys.org.uk</a> <a
                        class="x_x_moz-txt-link-rfc2396E"
                        href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk"
                        moz-do-not-send="true">
                        <dnsmasq-discuss@lists.thekelleys.org.uk></a><br>
                      <b>Subject:</b> Re: [Dnsmasq-discuss] How to Add
                      max-ttl in DNSMASQ
                      <div> </div>
                    </div>
                    <div class="x_x_BodyFragment"><span>
                        <div class="x_x_PlainText">On 11.10.21 16:01,
                          OMair Siddiquii wrote:<br>
                          >Even after upgrading to version 2.85 it
                          didn't work.<br>
                          <br>
                          what exactly does "didn't work" mean?<br>
                          does dnsmasq still refuse to start?<br>
                          do you have any error message?<br>
                          did you try to stop it before starting?<br>
                          <br>
                          <br>
                        </div>
                      </span></div>
                  </div>
                </blockquote>
                <pre class="x_x_moz-signature" cols="72">-- 
Petr Menšík
Software Engineer
Red Hat, <a class="x_x_moz-txt-link-freetext x_moz-txt-link-freetext moz-txt-link-freetext" href="http://www.redhat.com/" moz-do-not-send="true">http://www.redhat.com/</a>
email: <a class="x_x_moz-txt-link-abbreviated x_moz-txt-link-freetext moz-txt-link-freetext" href="mailto:pemensik@redhat.com" moz-do-not-send="true">pemensik@redhat.com</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
              </div>
            </div>
          </blockquote>
          <pre class="x_moz-signature" cols="72">-- 
Petr Menšík
Software Engineer
Red Hat, <a class="x_moz-txt-link-freetext moz-txt-link-freetext" href="http://www.redhat.com/" moz-do-not-send="true">http://www.redhat.com/</a>
email: <a class="x_moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:pemensik@redhat.com" moz-do-not-send="true">pemensik@redhat.com</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Petr Menšík
Software Engineer
Red Hat, <a class="moz-txt-link-freetext" href="http://www.redhat.com/">http://www.redhat.com/</a>
email: <a class="moz-txt-link-abbreviated" href="mailto:pemensik@redhat.com">pemensik@redhat.com</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
  </body>
</html>