4
I have a bind9 DNS server that I have configured to run in port 55 but I can't get the setup working. The server is works fine but I can't tune my local machine to resolve nameserver queries from 127.0.0.1, port 55
Example:
dig -p 55 a1.mylocalinstance.dip
...
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
;; QUESTION SECTION:
;a1.mylocalinstance.dip. IN A
;; ANSWER SECTION:
a1.mylocalinstance.dip. 10800 IN A 192.168.1.107
;; AUTHORITY SECTION:
mylocalinstance.dip. 10800 IN NS ns.mylocalinstance.dip.
;; ADDITIONAL SECTION:
ns.mylocalinstance.dip. 10800 IN A 192.168.1.100
;; Query time: 0 msec
;; SERVER: 127.0.0.1#55(127.0.0.1)
;; WHEN: Fri Dec 18 00:20:54 EET 2015
;; MSG SIZE rcvd: 96
When I try to ssh at my server:
$ssh test@a1.mylocalinstance.dip
ssh: Could not resolve hostname a1.mylocalinstance.dip: Name or service not known
My /etc/resolv.conf file:
nameserver [127.0.0.1]:55
nameserver fe80::1%wlan0
I don't understand the relations-dependencies between the network manager and the resolver and how to get things working with bind in my port and how can I forward my dns queries at port 55.
1
I have never seen any OS (and I've used quite a few) that will allow you to specify the port for DNS resolution. they will likely try both TCP and UDP, but always on port 53. about the best you can do, is use IP tables to redirect traffic from UDP\53 to UDP\55. see any example of port redirection here: http://www.cyberciti.biz/faq/linux-port-redirection-with-iptables/ Ultimately however, I believe you are chasing an untamed ornithoid without cause. Per the resolv.conf man page, a colon in
– Frank Thomas – 2015-12-17T23:46:42.877nameserver
will cause it to believe that its an IPv6 address. http://linux.die.net/man/5/resolv.conf@FrankThomas Will another service be able to bind in port 53? That's the whole reason for migrating to port 55 in the first place. I find it absurd that there is not such functionality – Mini Fridge – 2015-12-18T10:45:16.317
No, port redirection would leave the redirected port inaccessible. – Frank Thomas – 2015-12-18T15:41:24.997
The problem with changing this well-known port is you cannot create a reachable authoritative DNS server doing this. There is no way in the protocol to tell other nameservers that the port to use is anything other than 53. You could consider it a deficeincy, but it's never been needed in practice. There is a cleaner way to achieve what you want. – milli – 2016-01-03T06:13:59.103