Hello, I am new to setting up a secondary DNS through this system, and I have it all set up. However my main issue is when I am running a dig on my primary name server the ns2 is coming back with an internal IP address. I have the system set up with an internal IP address of 192.168.xxx.xxx that through my Router ports to my external IP Address that I am attempting to use. My dig results are as follows (replaced external IP with 1.2.3.4, domain with example.com as well as internal IP with 192.168.0.200): ; <<>> DiG 9.9.5-9+deb8u10-Debian <<>> @1.2.3.4 example.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29830 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;example.com. IN A ;; ANSWER SECTION: example.com. 3600 IN A 104.152.208.139 ;; AUTHORITY SECTION: example.com. 0 IN NS ns2.example.com. example.com. 3600 IN NS ns1.example.com. ;; ADDITIONAL SECTION: ns1.example.com. 3600 IN A 1.2.3.4 ns2.example.com. 0 IN A 192.168.0.200 ;; Query time: 15 msec ;; SERVER: 1.2.3.4#53(1.2.3.4) ;; WHEN: Wed Apr 05 11:28:56 EDT 2017 ;; MSG SIZE rcvd: 128 The section for ns2.example.com should state 4.3.2.1 (my NS2 external IP) and not 192.168.0.200 (the servers internal IP). Can anyone help me fix this issue?
If I understood your question correctly, in the DNS - zones - example.com - records, you have defined the ns2 a record, you should change that to the external ip. What you also should do to your main DNS servers is to add the records (glue) to the registrar (child dns settings or similar) for ns2 and ns1 to their corresponding external IPs.
That is done. I have the glue records already in place. Just in the DiG it shows as the internal IP and not the external IP.
So from the gui it shows the external ip for that host? And you have it mirrored to the slave? Have you set up debugging on the slave to see what it outputs when it tries to sync the values? You can check the /etc/bind/pri.example.com file at both hosts to verify what bind has.
pri.example.com on the master server has the following: ns2 3600 A 4.3.2.1 ns1 3600 A 1.2.3.4 pri.example.com on the slave server has the following: ns1 3600 A 1.2.3.4 ns2 3600 A 4.3.2.1 Master Server: dig @localhost example.com ns1.example.com. 3600 IN A 1.2.3.4 ns2.example.com. 3600 IN A 4.3.2.1 Slave Server: dig @1.2.3.4 example.com ns1.example.com. 3600 IN A 1.2.3.4 ns2.example.com. 0 IN A 192.168.0.200 Slave Server: dig @localhost example.com ns1.example.com. 3600 IN A 1.2.3.4 ns2.example.com. 3600 IN A 4.3.2.1 strange outcomes...
You don't happen to have any views in any of your bind configuration files? http://serverfault.com/questions/33...eturn-a-different-ip-based-on-requests-subnet
Are the results the same if you dig from somewhere else? For instance from http://www.kloth.net/services/dig.php
it holds the outside IP there. I just find it strange. perhaps it is just a resolution as I am attempting to pull information internally to the local IP. This makes me feel better and gives me the ability to flip the switch on my new web server Thank you for the help.