<div dir="ltr">Local port doesn't change anything and nc localhost returns nothing. To configure the port, I added these lines:<div><br></div><div>







<p class=""><span class=""><i># IP Address of web server to listen on</i></span></p>
<p class=""><span class=""><i>webserver-address=127.0.0.1</i></span></p>
<p class=""><span class=""><i># Port of web server to listen on</i></span></p>
<p class=""><span class=""><i>webserver-port=8081</i></span></p>
<p class=""><span class=""><i># Web server access is only allowed from these subnets</i></span></p>
<p class=""><span class=""><i>webserver-allow-from=<a href="http://0.0.0.0/0,::/0">0.0.0.0/0,::/0</a>"</i></span></p><p class="">And restarted pdns with 'sudo service pdns restart'. Now when I run 'sudo lsof -i -P | grep -i 8081' to see what is listening on that port, I get nothing at all listening on that port.  Shouldn't the port be listening after the pdns restart?</p>








<p class=""><span class=""></span><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-04 16:50 GMT+01:00 Juraj Lutter <span dir="ltr"><<a href="mailto:juraj@lutter.sk" target="_blank">juraj@lutter.sk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>--local-port specifies which OUTGOING
      PORT will curl use. not the destination port.<div><div class="h5"><br>
      <br>
      On 03/04/15 16:41, Melvin Mughal wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Yep, tried it. Put it in the config on 8081 and
        also tried 8082.  But then we get the '<span style="font-size:12.8000001907349px">curl: (45) bind failed
          with errno 48: Address already in use' response back. So no
          luck with that :(</span><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">2015-03-04 16:31 GMT+01:00 AJ McKee <span dir="ltr"><<a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a>></span>:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div dir="ltr">Hi Melvin,
                <div><br>
                </div>
                <div>Seems you are talking to your local apache,</div>
                <div><br>
                </div>
                <div>Try hostname:<span>8081
                    for your request, unless of course you have gone
                    through the trouble of reverse proxying the pdns
                    instance.</span></div>
                <div><span><br>
                  </span></div>
                <div><span>AJ</span></div>
              </div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">
                  <div>
                    <div>On 4 March 2015 at 15:17, Melvin
                      Mughal <span dir="ltr"><<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>></span>
                      wrote:<br>
                    </div>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                    <div>
                      <div>
                        <div dir="ltr">Followed the readme (<a href="https://doc.powerdns.com/md/httpapi/README/" target="_blank">https://doc.powerdns.com/md/httpapi/README/</a>).
                          Added those three lines to the pdns.conf, to
                          get the API working. When we try an API call,
                          it gives:
                          <div><br>
                          </div>
                          <div>
                            <p><i><!DOCTYPE HTML PUBLIC "-//IETF//DTD
                                HTML 2.0//EN"></i></p>
                            <p><i><html><head></i></p>
                            <p><i><title>404 Not
                                Found</title></i></p>
                            <p><i></head><body></i></p>
                            <p><i><h1>Not Found</h1></i></p>
                            <p><i><p>The requested URL
                                /servers/localhost/zones was not found
                                on this server.</p></i></p>
                            <p><i><hr></i></p>
                            <p><i><address>Apache/2.4.7 (Ubuntu)
                                Server at <a href="http://ourhostname.com" target="_blank">ourhostname.com</a> Port
                                80</address></i></p>
                            <p><i></body></html></i></p>
                            <p><i><br>
                              </i></p>
                            <p>When we add the lines to specify on which
                              address the webserver should be found, we
                              get:</p>
                            <p><br>
                            </p>
                            <p>curl --local-port 8081 -H 'X-API-Key:
                              NwY>kpVMMuB8ib' <a href="http://ns3.undev.nl/servers/localhost/zones" target="_blank">http://ourhostname.com/servers/localhost/zones</a>                                            ruby-2.1.1
                              [16:05]</p>
                            <p>
                            </p>
                            <p>curl: (45) bind failed with errno 48:
                              Address already in use</p>
                            <p><br>
                            </p>
                            <p>Anyone knows what's going wrong?</p>
                          </div>
                        </div>
                        <br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    Pdns-users mailing list<br>
                    <a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
                    <a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
                    <br>
                  </blockquote>
                </div>
                <span><font color="#888888"><br>
                    <br clear="all">
                    <div><br>
                    </div>
                    -- <br>
                    <div>AJ McKee<br>
                      phone: +353 83 1130 545<br>
                      profile:  <a href="http://linkedin.com/in/ajmkee" target="_blank">http://linkedin.com/in/ajmkee</a><br>
                      jid:       <a href="mailto:aj.mckee@druid-dns.com" target="_blank">aj.mckee@druid-dns.com</a><br>
                      blog:    <a href="http://aj.mc-kee.com/" target="_blank">http://aj.mc-kee.com/</a><br>
                      twitter: @ajmckee</div>
                  </font></span></div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Pdns-users mailing list
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a>
<a href="http://mailman.powerdns.com/mailman/listinfo/pdns-users" target="_blank">http://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    </div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
Juraj Lutter
URL:  <a href="http://www.wilbury.sk/" target="_blank">http://www.wilbury.sk/</a>
XMPP: <a href="mailto:juraj@lutter.sk" target="_blank">juraj@lutter.sk</a>
Pekny, mily a usmievavy webhosting a serverhousing: <a href="http://www.nic.sk/" target="_blank">http://www.nic.sk/</a>
</pre>
  </font></span></div>

</blockquote></div><br></div>