PowerDNS works only on local - linux

So. The PowerDNS 3.3 as salve works only on local.
(Also there is a nginx which works fine)
This work good
dig example.com A #127.0.0.1
But this not (slave server)
dig example.com A #ns2.example.com
;; global options: +cmd
;; connection timed out; no servers could be reached
I've tried with IP of ns2.example.com, but no good result anything.
Where the problem might be?

netstat -nao | grep 53 will help you.
You listen not at all local interfaces of filter DNS-port (TCP and UDP 53)

There was a problem in pdns-recursor config.
So, you need write your real IP address OR 0.0.0.0 instead of 127.0.0.1 in
local-address property.

Related

How do I make dig use a source IP other than localhost while querying a DNS server running locally on my machine?

I am trying to run a coredns plugin https://github.com/coredns/demo that returns 1.1.1.1 for 172.0.0.0/8 or 127.0.0.0/8 and 8.8.8.8 for everything else.
I run the binary and try to make a request from dig using dig example.org #localhost -p1053 +short which returns 1.1.1.1 since the request is sent from localhost
Is there anyway I can send a request from dig to coredns that it might look like to the DNS server that it is sent from another IP and it will return 8.8.8.8 instead?
From dig manual:
-b address[#port]
Set the source IP address of the query. The address must be a valid address on one of the host's network interfaces, or "0.0.0.0" or "::". An optional port may be
specified by appending "#<port>"
Otherwise, if the server supports ECS (EDNS Client Subnet) you can use dig option +subnet=addr to give it to the server and see how its reply changes.

dig domain ANY return refuse connection to port 53

I tried to run the below dig command:
dig www.google.com ANY
dig google.com ANY
but i always got the respone
;; Connection to 172.16.137.2#53(172.16.137.2) for www.google.com failed: connection refused.
I tried many other domains but nothing changed.
What would be the possible issue ?
Some DNS servers just refuse to answer ANY queries (including some resolvers). Still, "connection refused" would be a bad way of doing that, so it might be some other problem...

RabbitMQ wont cluster (nxdomain)

I want to set up 2 rabbitmq servers to work in cluster.
When when trying to run
rabbitmqctl join_cluster rabbit#my_rabbit_1.my.domain.name on my_rabbit_1
I get unable to connect to epmd (port 4369) on my_rabbit_2.my.domain.name: nxdomain (non-existing domain)
I use rabbitmq:latest (debian), .erlang.cookie is the same, hosts resolve fine: I can ping both directions, nmap -6 -p 4369 my_rabbit_2.my.domain.nam returns 4369/tcp open epmd
EDIT:
tcpdump shows that while resolving hostname, rabbit or epmd performs not 2 types of DNS query: AAAA for IPv6 and A for IPv4 address, but only IPv4 which fails repeatedly with nxdomain as there is no IPv4 address available. However, it does not try AAAA DNS query, except when trying to run command like rabbitmq -n rabbit#local.machine.domain.name: then it runs AAAA query and outputs successfully. Hence the problem. How do I solve that?
Finally found solution that worked for me. Erlang documentation says that, by default, -proto_dist specifies a protocol for Erlang distribution, which defaults to inet_tcp (TCP over IPv4). So in IPv6-only environment you have to set -proto_dist inet6_tcp flag for erl.
This can be done by adding the following lines to your rabbitmq-env.conf (see RabbitMQ configuration docs):
# For rabbitmq-server
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-proto_dist inet6_tcp"
# For rabbitmqctl
RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp"
Note that rabbitmqctl and rabbitmq-server use different erl settings: I was unable to create cluster without RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp" setting using rabbitmqctl join_cluster rabbit#host.in.my.domain. It should not be necessary in production mode. Also note that RabbitMQ configuration docs advice against using this setting except for debugging.
unable to connect to epmd (port 4369) on my_rabbit_2.my.domain.name: nxdomain (non-existing domain)
This is an error raised when the rabbitmq server is running on a hostname other than what you think it is running on, or when hostname doesn't resolve to what you think it does.
Amusingly enough I had this exact same issue last night when one instance in our cluster failed, came back on a new hostname, and somehow corrupted its internal authentication store etc.
Without the exact dns entries etc for your setup, all I can offer is general troubleshooting steps.
See this StackOverflow question for a resolution that may help you - in particular the answer by Kishor Pawar.
Are you sure you configured rabbitmq to listen on IPV6? Is there a reason you can't bind it to IPV4 as well on 127.0.0.1 for management operations?

Do I need anything else other than an SRV record to make it work?

I'm trying to setup an SRV record to let users connect to a game server.
The server uses the port 27016 UDP and TCP (actually TCP is used just by steam) so I have created two SRV records:
_ARKSRV._tcp.join.domain.tld. SRV domain.tld.
_ARKSRV._udp.join.domain.tld. SRV domain.tld.
But when I try to ping it or use nslookup I get:
~$ ping join.domain.tld
ping: cannot resolve join.domain.tld: Unknown host
~$ nslookup -q=SRV _ARKSRV._tcp.join.domain.tld
Server: 8.8.8.8
Address: 8.8.8.8#53
** server can't find _ARKSRV._tcp.domain.tld: NXDOMAIN
I'm wondering if I need to create even an A record to make it work or what.
your zone records:
_ARKSRV._tcp.join.domain.tld. SRV domain.tld.
_ARKSRV._udp.join.domain.tld. SRV domain.tld.
do not match your lookup:
~$ nslookup -q=SRV _ARKSRV._tcp.domain.tld
Your SRV record also appears to have an incorrect syntax. Part of the reason to use an SRV record is so that you can specify port. Reference link

receive all public hostnames in a bind (linux) server

I need to save all public hostnames, that usually can be detected with a dns query, in my dns server (bind9 in a kubuntu distribution), and after I need to open this list to elaborate it in a c++ program.
How is it possible to do this saving operation? Thanks a lot!
You can use host or dig command to run axfr query and redirect output to file:
host -t axfr yourdomain.com > records.txt
or
dig yourdomain.com axfr > records.txt
You can do this directly in dns server or any other host that has Bind's permission to do so.
Note that you have to have tcp port 53 open to your dns server if you use external host to run query.

Resources