We are having a prelaunch-site to test DNS (and other services) before going hot.
I've never involved public IPs here previously and it may not work as I've intended. We have a /29-net from our ISP that are public IPs. 121.24.124.144/29.
To test our DNS for different "view"s we have set up the LAN side of a router to emulate this net; with the router as the GW to our ISP. Apart from not being able to actually connect from the outside (which of course could be done through port forwarding) this is not the intention here.)
Topology:
The router that is connected to our ISP is dhcp-connected with NAT to our network.
LAN IP set as 121.24.124.145/29 (This is our own IP-net so it is not meant to be connected to from outside at this point) It should (and it does) work as prisoner in the local area world. For the time being.
The router (shelby) where our DNS is connected has WAN IP as 121.24.124.146 and LAN 192.168.13.1.
DNS-server (emma) at 192.168.13.2.
> dig -x 121.24.124.146 @192.168.13.2
results in:
;; ANSWER SECTION:
146.124.24.121.in-addr.arpa. 86400 IN PTR static-121-24-124-146.cust.com.
;; AUTHORITY SECTION:
124.24.121.in-addr.arpa. 77013 IN NS o.dns.cust.com.
124.24.121.in-addr.arpa. 77013 IN NS f.dns.cust.com.
;; ADDITIONAL SECTION:
f.dns.cust.com. 76895 IN A 19.71.22.3
o.dns.cust.com. 77013 IN A 19.71.18.5
(Which is the current owner (the ISP) of the IP-address at this time)
where I assumed our dns would reply with
;; ANSWER SECTION:
146.124.24.121.in-addr.arpa. 86400 IN PTR fw-shelby.energia.com.
Any other local host works as intended when making a reverse lookup, with correct IP/FQDN. Forwarding address works fine.
> dig fw-shelby.energia.com
;; ANSWER SECTION:
fw-shelby.energia.com. 10800 IN CNAME shelby.energia.com.
shelby.energia.com. 10800 IN A 121.24.124.146
;; AUTHORITY SECTION:
energia.com. 10800 IN NS emma.energia.com.
;; ADDITIONAL SECTION:
emma.energia.com. 10800 IN A 192.168.13.1
Some questions arises from this result.
- Is BIND aware of Public IPs compared to internal (192.168. etc) ? [such that a reverslookup will result in an external lookup instead of our local fqdn]
- Our reverse file is configured from the fact that the network is /29 meaning it starts at .144 which suggests that the reverse lookup file also starts at 144.124.24.121.in-addr.arpa. I can't find any information nor examples of small networks and reverse-lookup files starting anywhere but at 0....in-addr.arpa. Is this a limitation, an unusual solution or a fault doing like this?
- If this is not broken nor correct - how would this be setup to work then?
Files affected:
/etc/bind/zonefiles/public/named.reverse.zone.conf
zone "144.124.24.121.in-addr.arpa"
{
type master;
file "/etc/bind/zonefiles/public/reverse-144.124.24.121.zone";
allow-update { none; };
};
; /etc/bind/zonefiles/public/reverse-144.124.24.121.zone
; 121.24.124.144 (-121.24.124.151)
$ORIGIN 144.124.24.121.in-addr.arpa.
$TTL 345600
@ IN SOA emma.energia.com. root.emma.energia.com. (
2022101102 ;Serial
86400 ;Refresh 24 hours
7200 ;Retry 2 hours
2592000 ;Expire 30 days
345600 ) ;Minimum 4 days
IN NS emma.energia.com.
145 IN PTR gw-isp.energia.com.
146 IN PTR shelby.energia.com.
147 IN PTR shelley.energia.com.
148 IN PTR mailis.energia.com.
149 IN PTR ava.energia.com.
150 IN PTR www.energia.com.
I checked setting zone to $ORIGIN 124.24.121.in-addr.arpa.
Just to rule out that reverse zone may not be allowed so "small". But no, No difference.
As for a reference:
; Bind reverse hosts
$ORIGIN 13.168.192.in-addr.arpa.
$TTL 345600
@ IN SOA emma.energia.com. root.emma.energia.com. (
1998030900 ;Serial
86400 ;Refresh 24 hours
7200 ;Retry 2 hours
2592000 ;Expire 30 days
345600 ) ;Minimum 4 days
IN NS emma.energia.com.
1 IN PTR gw-shelby.energia.com.
2 IN PTR emma.energia.com.
3 IN PTR gw-rivendale-link-br.energia.com.
4 IN PTR unused-ip-rd4.energia.com.
Works fine both forward and reverse. I havn't submitted any other named config files as the rest works and the logs confirms the zones has loaded. But if needed please ask!
It would be less frustrating getting our own reverse names coming up. The ISPs reverse names are only confusing.