Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
Yep, tried it. Put it in the config on 8081 and also tried 8082.  But then
we get the 'curl: (45) bind failed with errno 48: Address already in use'
response back. So no luck with that :(

2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

 Seems you are talking to your local apache,

 Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

 AJ

 On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

 Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added
 those three lines to the pdns.conf, to get the API working. When we try an
 API call, it gives:

 *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


 When we add the lines to specify on which address the webserver should be
 found, we get:


 curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones
 ruby-2.1.1
 [16:05]

 curl: (45) bind failed with errno 48: Address already in use


 Anyone knows what's going wrong?

 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
Yes because you are telling curl to use port 8081,

try just curl hostname:8081 and you commands, i.e. remove --local-port

Failing that, try nc localhost 8081 and simulate a HTTP request to the
service.

AJ

On 4 March 2015 at 15:41, Melvin Mughal mel...@mughal.nu wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But then
 we get the 'curl: (45) bind failed with errno 48: Address already in use'
 response back. So no luck with that :(


 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

 Seems you are talking to your local apache,

 Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

 AJ

 On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

 Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When we
 try an API call, it gives:

 *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


 When we add the lines to specify on which address the webserver should
 be found, we get:


 curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones   
  ruby-2.1.1
 [16:05]

 curl: (45) bind failed with errno 48: Address already in use


 Anyone knows what's going wrong?

 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




-- 
AJ McKee
phone: +353 83 1130 545
profile:  http://linkedin.com/in/ajmkee
jid:   aj.mc...@druid-dns.com
blog:http://aj.mc-kee.com/
twitter: @ajmckee
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
You will also have to ensure have been set in config.

experimental-json-interface=yes
experimental-api-key=changeme


On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote:

 Local port doesn't change anything and nc localhost returns nothing. To
 configure the port, I added these lines:

 *# IP Address of web server to listen on*

 *webserver-address=127.0.0.1*

 *# Port of web server to listen on*

 *webserver-port=8081*

 *# Web server access is only allowed from these subnets*

 *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

 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?



 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But
 then we get the 'curl: (45) bind failed with errno 48: Address already
 in use' response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver
 should be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones  
   ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




-- 
AJ McKee
phone: +353 83 1130 545
profile:  http://linkedin.com/in/ajmkee
jid:   aj.mc...@druid-dns.com
blog:http://aj.mc-kee.com/
twitter: @ajmckee
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
Local port doesn't change anything and nc localhost returns nothing. To
configure the port, I added these lines:

*# IP Address of web server to listen on*

*webserver-address=127.0.0.1*

*# Port of web server to listen on*

*webserver-port=8081*

*# Web server access is only allowed from these subnets*

*webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

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?



2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But then
 we get the 'curl: (45) bind failed with errno 48: Address already in use'
 response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver should
 be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones   
  ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
Weird...

For sure its not hitting the API service, its apache. Could you post
version and config information please, removing any identifiable or
security information and i will test your config on a vm and let you know
AJ

On 4 March 2015 at 16:27, Melvin Mughal mel...@mughal.nu wrote:

 Yes, already in the same config:

 # Enable and config API

 experimental-json-interface=yes

 experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key)

 webserver=yes

 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 You will also have to ensure have been set in config.

 experimental-json-interface=yes
 experimental-api-key=changeme


 On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote:

 Local port doesn't change anything and nc localhost returns nothing. To
 configure the port, I added these lines:

 *# IP Address of web server to listen on*

 *webserver-address=127.0.0.1*

 *# Port of web server to listen on*

 *webserver-port=8081*

 *# Web server access is only allowed from these subnets*

 *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

 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?



 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But
 then we get the 'curl: (45) bind failed with errno 48: Address already
 in use' response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver
 should be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones
 ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




-- 
AJ McKee
phone: +353 83 1130 545
profile:  http://linkedin.com/in/ajmkee
jid:   aj.mc...@druid-dns.com
blog:http://aj.mc-kee.com/
twitter: @ajmckee
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
Yes, already in the same config:

# Enable and config API

experimental-json-interface=yes

experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key)

webserver=yes

2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 You will also have to ensure have been set in config.

 experimental-json-interface=yes
 experimental-api-key=changeme


 On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote:

 Local port doesn't change anything and nc localhost returns nothing. To
 configure the port, I added these lines:

 *# IP Address of web server to listen on*

 *webserver-address=127.0.0.1*

 *# Port of web server to listen on*

 *webserver-port=8081*

 *# Web server access is only allowed from these subnets*

 *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

 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?



 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But
 then we get the 'curl: (45) bind failed with errno 48: Address already
 in use' response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver
 should be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones 
ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2.
This is the entire pdns.conf file in /etc/powerdns:

http://pastebin.com/14LqMbLp

2015-03-04 18:30 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Weird...

 For sure its not hitting the API service, its apache. Could you post
 version and config information please, removing any identifiable or
 security information and i will test your config on a vm and let you know
 AJ

 On 4 March 2015 at 16:27, Melvin Mughal mel...@mughal.nu wrote:

 Yes, already in the same config:

 # Enable and config API

 experimental-json-interface=yes

 experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key)

 webserver=yes

 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 You will also have to ensure have been set in config.

 experimental-json-interface=yes
 experimental-api-key=changeme


 On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote:

 Local port doesn't change anything and nc localhost returns nothing. To
 configure the port, I added these lines:

 *# IP Address of web server to listen on*

 *webserver-address=127.0.0.1*

 *# Port of web server to listen on*

 *webserver-port=8081*

 *# Web server access is only allowed from these subnets*

 *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

 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?



 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But
 then we get the 'curl: (45) bind failed with errno 48: Address
 already in use' response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When 
 we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver
 should be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones   
  ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] Configure private subdomain

2015-03-04 Thread Michael Ströder
Nikolaos Milas wrote:
 On 3/3/2015 2:44 μμ, Nikolaos Milas wrote:
 
 Ideally, we would like pdns to be configured to reply to requests *for
 particular names* (under a specific subdomain, say internal.example.com) by
 only providing  records (if available, otherwise no results) and hide A
 records.

 This way we could specify (for names under a specific domain), A records
 which will contain a Private IP Address, so as to  not be visible to the
 Internet but only locally.
 
 Corrections/Clarifications:
 
 Ideally, we would like pdns to be configured to reply to requests *for
 particular names* (under a specific subdomain, say internal.example.com) by
 only providing  records (if available, otherwise no results) and hide A
 records to all requests, except to those from our own networks (as would be
 configured), to which full replies would be provided.
 
 This way we could specify (for names under a specific domain), A records
 which will contain a Private IP Address, so as to  not be visible to the
 Internet but only locally (to our own networks, which would be specified
 explicitly).

This sounds a bit like a special case for split horizon DNS.

I promised to configure a demo using powerdns with LDAP backend for this based
on OpenLDAP ACLs and several powerdns instances using different LDAP identities.

Feel free to come here and ask whether I managed to get it working in time:
https://chemnitzer.linux-tage.de/2015/en/programm/beitrag/134

Ciao, Michael.




smime.p7s
Description: S/MIME Cryptographic Signature
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread AJ McKee
Hi Melvin,

Seems you are talking to your local apache,

Try hostname:8081 for your request, unless of course you have gone through
the trouble of reverse proxying the pdns instance.

AJ

On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

 Followed the readme (https://doc.powerdns.com/md/httpapi/README/). Added
 those three lines to the pdns.conf, to get the API working. When we try an
 API call, it gives:

 *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on this
 server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


 When we add the lines to specify on which address the webserver should be
 found, we get:


 curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones 
ruby-2.1.1
 [16:05]

 curl: (45) bind failed with errno 48: Address already in use


 Anyone knows what's going wrong?

 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




-- 
AJ McKee
phone: +353 83 1130 545
profile:  http://linkedin.com/in/ajmkee
jid:   aj.mc...@druid-dns.com
blog:http://aj.mc-kee.com/
twitter: @ajmckee
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread Melvin Mughal
Tried the config lines from this post (
http://jpmens.net/2015/01/09/a-look-at-the-powerdns-rest-api/) and the curl
commands give no errors anymore. But the problem remains, that nothing is
listening on 8081. So the curl in the command line returns nothing.

2015-03-04 20:09 GMT+01:00 Melvin Mughal mel...@mughal.nu:

 This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2.
 This is the entire pdns.conf file in /etc/powerdns:

 http://pastebin.com/14LqMbLp

 2015-03-04 18:30 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Weird...

 For sure its not hitting the API service, its apache. Could you post
 version and config information please, removing any identifiable or
 security information and i will test your config on a vm and let you know
 AJ

 On 4 March 2015 at 16:27, Melvin Mughal mel...@mughal.nu wrote:

 Yes, already in the same config:

 # Enable and config API

 experimental-json-interface=yes

 experimental-api-key=NwYkpVMMuGEaDH8ib (not the real API key)

 webserver=yes

 2015-03-04 17:20 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 You will also have to ensure have been set in config.

 experimental-json-interface=yes
 experimental-api-key=changeme


 On 4 March 2015 at 16:15, Melvin Mughal mel...@mughal.nu wrote:

 Local port doesn't change anything and nc localhost returns nothing.
 To configure the port, I added these lines:

 *# IP Address of web server to listen on*

 *webserver-address=127.0.0.1*

 *# Port of web server to listen on*

 *webserver-port=8081*

 *# Web server access is only allowed from these subnets*

 *webserver-allow-from=0.0.0.0/0,::/0 http://0.0.0.0/0,::/0*

 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?



 2015-03-04 16:50 GMT+01:00 Juraj Lutter ju...@lutter.sk:

  --local-port specifies which OUTGOING PORT will curl use. not the
 destination port.


 On 03/04/15 16:41, Melvin Mughal wrote:

 Yep, tried it. Put it in the config on 8081 and also tried 8082.  But
 then we get the 'curl: (45) bind failed with errno 48: Address
 already in use' response back. So no luck with that :(

 2015-03-04 16:31 GMT+01:00 AJ McKee aj.mc...@druid-dns.com:

 Hi Melvin,

  Seems you are talking to your local apache,

  Try hostname:8081 for your request, unless of course you have gone
 through the trouble of reverse proxying the pdns instance.

  AJ

  On 4 March 2015 at 15:17, Melvin Mughal mel...@mughal.nu wrote:

  Followed the readme (https://doc.powerdns.com/md/httpapi/README/).
 Added those three lines to the pdns.conf, to get the API working. When 
 we
 try an API call, it gives:

  *!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN*

 *htmlhead*

 *title404 Not Found/title*

 */headbody*

 *h1Not Found/h1*

 *pThe requested URL /servers/localhost/zones was not found on
 this server./p*

 *hr*

 *addressApache/2.4.7 (Ubuntu) Server at ourhostname.com
 http://ourhostname.com Port 80/address*

 */body/html*


  When we add the lines to specify on which address the webserver
 should be found, we get:


  curl --local-port 8081 -H 'X-API-Key: NwYkpVMMuB8ib'
 http://ourhostname.com/servers/localhost/zones
 http://ns3.undev.nl/servers/localhost/zones  
   ruby-2.1.1
 [16:05]

  curl: (45) bind failed with errno 48: Address already in use


  Anyone knows what's going wrong?

  ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




  --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee




 ___
 Pdns-users mailing 
 listPdns-users@mailman.powerdns.comhttp://mailman.powerdns.com/mailman/listinfo/pdns-users



 --
 Juraj Lutter
 URL:  http://www.wilbury.sk/
 XMPP: ju...@lutter.sk
 Pekny, mily a usmievavy webhosting a serverhousing: http://www.nic.sk/



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee



 ___
 Pdns-users mailing list
 Pdns-users@mailman.powerdns.com
 http://mailman.powerdns.com/mailman/listinfo/pdns-users




 --
 AJ McKee
 phone: +353 83 1130 545
 profile:  http://linkedin.com/in/ajmkee
 jid:   aj.mc...@druid-dns.com
 blog:http://aj.mc-kee.com/
 twitter: @ajmckee



___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] NS records number per zone.

2015-03-04 Thread Margus Kiting
Hi!

I'm experiencing strange problem with my superslave powerdns version 3.4.2
using sqlite3 backend.

I have one large zone, that has many NS records, about 200 and the problem
is, that this zone is not created on the superslave server automatically.

Unable to find backend willing to host zone.name for potential supermaster
master.ip.address. 15 remote nameservers:

If I define the zone manually to slave server and send out notification
from master nameserver, all data is correctly added to slave server.

I have many zones in supermaster server that have 6 NS records defined and
these are working perfectly.

I could not find any restrictions for NS record number in RFC documents.

Is is possible that powerdns server has some kind of limitation how many NS
records can be read on first zone transfer after master notification and
decide if the superslave server is listed for zone creation?

I hope that the problem description is not confusing.

Thank You in advance!
Margus
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] Configure private subdomain

2015-03-04 Thread Nikolaos Milas

On 4/3/2015 8:17 μμ, Michael Ströder wrote:


This sounds a bit like a special case for split horizon DNS.


Precisely.


I promised to configure a demo using powerdns with LDAP backend for this based
on OpenLDAP ACLs and several powerdns instances using different LDAP identities.

Feel free to come here and ask whether I managed to get it working in time:
https://chemnitzer.linux-tage.de/2015/en/programm/beitrag/134


I am sure it can be done, however it might take significant work; I know 
you can do it. (I would like to play with it as well, yet I would have 
to invest time which I cannot afford now...)


Although I will not be able to attend the event, it would be nice to 
make this demo in a way that it is streamlined enough to be (relatively) 
easily reproduced by others. I guess that the most important part of 
this effort is ACL authoring in order to isolate entries / attributes.


Please post your work and scripts here (or notify us on where you have 
posted it). I would surely like to use this work (esp. if it is handy 
enough).


Despite the fact that PowerDNS with LDAP backend seems underutilized and 
LDAP backend development has been neglected for years (due to lack of 
interest and private investment), I see much potential in it, as you, 
and it would be worth trying to revive it.


Unfortunately, Grégory Oestreicher's fork 
(http://repo.or.cz/w/pdns-ldap-backend.git) of the LDAP backend (which 
is the most updated source code) has not had any progress for two years now.


All the best,
Nick


___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] API issue

2015-03-04 Thread Jan-Piet Mens
 This version of PowerDNS we use is PowerDNS Authoritative Server 3.4.2.
 This is the entire pdns.conf file in /etc/powerdns:
 
 http://pastebin.com/14LqMbLp

Line 623 has crud behind it; that better not be in the configuration.

Also show us the *exact* curl command you're using from the
command-line, and the API key (if you're using line 623) better be
protected from the shell. :)

-JP

___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users