opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
137 stars 35 forks source link

IPv6 Adresses (AAAA RR) are saved/exported as IPv4 Adresses (A RR) #78

Closed raabf closed 10 years ago

raabf commented 10 years ago

I am actually use v13.03.01

AAAA in List - A in Edit Dialog

AAAA RR are generally working but they seem to be treated as A RR. I took care to add my IPv6 Addresses with an AAAA RR, but they are nevertheless A RR. They are shown correct in the list but not if you edit them. See this screenshot:

2014-05-15 15_50_58-opennetadmin __ 0wn your network

Export to BIND

A instead of AAAA

The AAAA RR will also be exported as an A RR. A bind configuration shown in Work Space: display_domain: 4raab.de looks like this (filtered for privency):

; DNS zone file for 4raab.de built on May 15th, 4:03pm
; TOTAL RECORDS (count=62)

$ORIGIN 4raab.de.
$TTL 86400
;Serial number is current unix timestamp (seconds since UTC)

@      IN      SOA   l.ns.4raab.de. hostmaster.4raab.de. (1400162580 86400 3600 3600 3600)

fabian-silver.4raab.de.                                     IN  A        192.168.123.44                 
fabian-silver.4raab.de.                                     IN  A        fd07:c75d:40e2:0001:0250:fcff:fe32:23d4 

Also the build_bind script provided by the Bind plugin will also produce only A records.

I'm actually workaround this with running a sed command afterwards (if someone look for temporary solution):

/bin/sed -e 's%A        \([0-9a-z]*\)\:%AAAA     \1:%g' ${ONABASE}/etc/bind/zone_data/named-4raab.de > ${ONABASE}/etc/bind/zone_data/named-new-4raab.de

.in-addr.arpa. instead of .ip6.arpa.

PTR RR are also exported to .in-addr.arpa. (IPv4 PTR) instead of .ip6.arpa. (IPv6 PTR). A bind configuration shown in Work Space: display_domain: 1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa looks like this (filtered for privency):

; DNS zone file for 1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa built on May 15th, 4:17pm
; TOTAL RECORDS (count=11)

$ORIGIN 1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa.
$TTL 86400
;Serial number is current unix timestamp (seconds since UTC)

@      IN      SOA   l.ns.4raab.de. hostmaster.4raab.de. (1400163441 86400 3600 3600 3600)

1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa.                   IN  NS       l.ns.4raab.de.                                            
2.a.4.2.3.4.e.f.f.f.d.4.a.1.2.0.1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.in-addr.arpa.          IN  PTR      fabian-silver.4raab.de.

Also the build_bind script provided by the Bind plugin will also produce only .in-addr.arpa. domains.

I'm actually workaround this with running a sed command afterwards (if someone look for temporary solution. Well its not nice you have to modify it ...):

/bin/sed -e 's%.1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.in-addr.arpa.%\t%g' ${ONABASE}/etc/bind/zone_data/named-1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa > ${ONABASE}/etc/bind/zone_data/named-new-1.0.0.0.2.e.0.4.d.5.7.c.7.0.d.f.ip6.arpa
mattpascoe commented 10 years ago

For the first part of this issue, the edit dialog does still show 'A' instead of 'AAAA'.. I will work to fix this issue. There are probably a few other places I could have missed on this same representation of those two terms.

The second part of the issue around building bind configuration. It looks like you are not using the ipv6 branch of the build_bind scripts. I would suggest you go to https://github.com/opennetadmin/build_bind/tree/ipv6 and get that branch. I have not yet merged the ipv6 changes in to master due to lack of testing.

raabf commented 10 years ago

AAAA in List - A in Edit Dialog: Yea I can imagine that the change from v4 to v6 could be sometimes a bit problematic...

Export to BIND: Ah great, that is much better then the sed commands^^. Sorry I do not see that there is such a branch. Perhaps you should add a short comment to the build_bind install doc, so that other ones will notice it ...