Building a Linux IPv6 DNS Server
One output file is produced: /var/named/master/secv6.your.domain.signed. This file should be referenced by /etc/named.conf as the input file for the zone.
The remaining configuration files are localhost.zone (Listing 3), localhost.rev (Listing 4), secv6.rev (Listing 5) and secv6.int (Listing 6). The difference between reverse lookup zone files secv6.rev and secv6.int is that one can be specified using A6 strings (that do not need to be reversed in secv6.rev) and the other with reverse AAAA format addresses in secv6.int. For instance, ping6 can refer only to secv6.int domain because it does not support A6 format.
Listing 3. /var/named/master/localhost.zone
// localhost.zone Allows for local communications // using the loopback interface $TTL 86400 $ORIGIN localhost. @ 1D IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expire 1D ) ; minimum 1D IN NS @ 1D IN A 127.0.0.1
Listing 4. /var/named/master/localhost.rev
// localhost.rev Defines reverse DNS lookup on // loopback interface $TTL 86400 $ORIGIN 0.0.127.in-addr.arpa. @ IN SOA 0.0.127.in-addr.arpa. hostmaster.secv6.your.domain. ( 42 ; Serial number (d. adams) 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum NS ns.secv6.your.domain. MX 10 noah.ip6.your.domain. PTR localhost.
Listing 5. /var/named/master/secv6.rev
// secv6.rev Defines reverse lookup for secv6 // domain in A6 format $TTL 86400 $ORIGIN secv6.arpa. @ IN SOA secv6.arpa. hostmaster.secv6.your.domain. ( 2002011442 ; Serial number (yyyymmdd-num) 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum NS ns.secv6.your.domain. MX 10 noah.your.domain. ; fec0:0:0:1::/64 $ORIGIN \[xfec0000000000001/64].secv6.arpa. \[x0250b7fffe1435d0/64] 1D IN PTR pc2.secv6.your.domain. \[x0250b9fffe000131/64] 1D IN PTR pc3.secv6.your.domain. \[x0250b7fffe143617/64] 1D IN PTR pc6.secv6.your.domain. \[x0250b7fffe1435c4/64] 1D IN PTR pc4.secv6.your.domain. \[x0250b7fffe14361b/64] 1D IN PTR pc5.secv6.your.domain. \[x0250b7fffe14365a/64] 1D IN PTR pc7.secv6.your.domain. \[x0250b9fffe00012e/64] 1D IN PTR pc1.secv6.your.domain.
Listing 6. /var/named/master/secv6.int
// secv6.int Defines reverse lookup for secv6 // domain in AAA format $TTL 86400 $ORIGIN secv6.int. @ IN SOA secv6.int. hostmaster.secv6.your.domain. ( 2002011442 ; Serial number (yyyymmdd-num) 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum NS ns.secv6.your.domain. MX 10 noah.your.domain. ; fec0:0:0:1::/64 $ORIGIN 18.104.22.168.0.0.0.0.0.0.0.0.0.c.e.f.secv6.int. 0.d.22.214.171.124.e.f.f.f.7.b.0.5.2.0 IN PTR pc2.secv6.your.domain. e.126.96.36.199.0.e.f.f.f.9.b.0.5.2.0 IN PTR pc1.secv6.your.domain. 188.8.131.52.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR pc1.secv6.your.domain. 184.108.40.206.0.0.e.f.f.f.9.b.0.5.2.0 IN PTR pc3.secv6.your.domain. 220.127.116.11.4.1.e.f.f.f.7.b.0.5.2.0 IN PTR pc6.secv6.your.domain. 4.c.18.104.22.168.e.f.f.f.7.b.0.5.2.0 IN PTR pc4.secv6.your.domain. b.22.214.171.124.1.e.f.f.f.7.b.0.5.2.0 IN PTR pc5.secv6.your.domain.
Once the installation and configuration steps are complete, you are ready to start the DNS dæmon on pc2. Named uses /etc/named.conf by default, although you can specify a different configuration file with the -c option if you want. Depending on where you installed the dæmon, enter:
One additional configuration step is needed on the machines within the IPv6 network: update /etc/resolv.conf (Listing 7) to contain the DNS server's IP address. It is important that the IP address is included and not the hostname of the DNS server, because this file is where the system looks to find the address of the DNS. In other words, if you specified the hostname of the DNS server here, how would the system know what IP address corresponds to the DNS' hostname?
Listing 7. /etc/resolv.conf on Client Machines
# To enable secv6 domain, start named on pc2 # and use this file as /etc/resolv.conf search secv6.your.domain nameserver fec0::1:250:b7ff:fe14:35d0
We use two simple methods of testing the setup. The first verifies that A6 addresses are enabled in the DNS server, and the second verifies that AAAA addresses are supported by the DNS server. The tests were performed on pc2. We present only the meaningful output here; otherwise the listing would be too long. For the first example, we use the DNS lookup utility dig to perform a lookup on secv6 domain in A6 format (Listing 8). We then perform a lookup in AAAA format (Listing 9). In both cases, we are not specifying an address to look up, thus our use of 0.0.0.0.
Listing 8. A6 DNS Query
pc2% dig 0.0.0.0 secv6.your.domain a6 ; <<>> DiG 9.1.0 <<>> 0.0.0.0 secv6.your.domain A6 [...] ;secv6.your.domain. IN A6 ;; ANSWER SECTION: secv6.your.domain. 86400 IN A6 0 fec0::1:250:b7ff:fe14:35d0 ;; AUTHORITY SECTION: secv6.your.domain. 86400 IN NS ns.secv6.your.domain. ;; ADDITIONAL SECTION: ns.secv6.your.domain. 86400 IN A6 0 fec0::1:250:b7ff:fe14:35d0 ns.secv6.your.domain. 86400 IN AAAA fec0::1:250:b7ff:fe14:35d0
Listing 9. AAAA DNS Query
pc2% dig 0.0.0.0 secv6.your.domain aaaa ; <<>> DiG 9.1.0 <<>> 0.0.0.0 secv6.your.domain AAAA [...] ;secv6.your.domain. IN AAAA ;; ANSWER SECTION: secv6.your.domain. 86400 IN AAAA fec0::1:250:b7ff:fe14:35d0 ;; AUTHORITY SECTION: secv6.your.domain. 86400 IN NS ns.secv6.your.domain. ;; ADDITIONAL SECTION: ns.secv6.your.domain. 86400 IN A6 0 fec0::1:250:b7ff:fe14:35d0 ns.secv6.your.domain. 86400 IN AAAA fec0::1:250:b7ff:fe14:35d0
For our second test, we include samples of an SSH session connection, first using an IPv6 address and then using an IPv6 hostname.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- The Qt Company's Qt Start-Up
- Devuan Beta Release
- May 2016 Issue of Linux Journal
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The US Government and Open-Source Software
- Open-Source Project Secretly Funded by CIA
- The Death of RoboVM
- The Humble Hacker?
- New Container Image Standard Promises More Portable Apps
- BitTorrent Inc.'s Sync
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide