Dear all,
Follow this tutorial: https://www.unixmen.com/setting-dns-server-centos-7/
I set up the DNS server on a Cent OS 7. After finishing, I tried to test on the masterdns server: the server can resolve name to IP addr but can not resolve the IP addr to the name.
Anyone help me to fix that issue?
Note again: I do this test on that DNS server itself.
Tks,
NTQ
can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
-
- Posts: 4
- Joined: 2019/02/20 05:04:47
Re: can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
To resolve ip addresses to names you must configure a reverse zone.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 4
- Joined: 2019/02/20 05:04:47
Re: can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
Hi TrevoH,
I created the reverse file as below:
$TTL 86400
@ IN SOA master.ntqlab.com. root.ntqlab.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimium TTL
)
@ IN NS master.ntqlab.com.
@ IN PTR ntqlab.com.
master IN A 5.1.103.249
client IN A 5.1.103.164
249 IN PTR master.ntqlab.com.
164 IN PTR client.ntqlab.com.
I created the reverse file as below:
$TTL 86400
@ IN SOA master.ntqlab.com. root.ntqlab.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimium TTL
)
@ IN NS master.ntqlab.com.
@ IN PTR ntqlab.com.
master IN A 5.1.103.249
client IN A 5.1.103.164
249 IN PTR master.ntqlab.com.
164 IN PTR client.ntqlab.com.
-
- Posts: 4
- Joined: 2019/02/20 05:04:47
Re: can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
And this is the result I get:
[root@master ~]# nslookup
> master
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: master.ntqlab.com
Address: 5.1.103.249
> client
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: client.ntqlab.com
Address: 5.1.103.164
> 5.1.103.249
Server: 5.1.103.249
Address: 5.1.103.249#53
** server can't find 249.103.1.5.in-addr.arpa.: NXDOMAIN
> exit
[root@master ~]#
[root@master ~]# nslookup
> master
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: master.ntqlab.com
Address: 5.1.103.249
> client
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: client.ntqlab.com
Address: 5.1.103.164
> 5.1.103.249
Server: 5.1.103.249
Address: 5.1.103.249#53
** server can't find 249.103.1.5.in-addr.arpa.: NXDOMAIN
> exit
[root@master ~]#
Re: can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
Hi, think you got some bits of the reverse zone wrong. Here's how it should be:
After you update the file, don't forget to do rndc reconfig. Let us know!
Code: Select all
$TTL 86400
@ IN SOA master.ntqlab.com. root.master.ntqlab.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimium TTL
)
IN NS master.ntqlab.com.
249 IN PTR master.ntqlab.com.
164 IN PTR client.ntqlab.com.
-
- Posts: 4
- Joined: 2019/02/20 05:04:47
Re: can resolve hostname to IP Addr but CAN NOT resolve IP Addrs to name
Hi Greys,
I've tried to modified the file and do rndc reconfig but it still can not work.
Event I reboot the server.
The file:
$TTL 86400
@ IN SOA master.ntqlab.com. root.master.ntqlab.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimium TTL
)
IN NS master.ntqlab.com.
249 IN PTR master.ntqlab.com.
164 IN PTR client.ntqlab.com.
And the result:
> master
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: master.ntqlab.com
Address: 5.1.103.249
> 5.1.103.249
Server: 5.1.103.249
Address: 5.1.103.249#53
** server can't find 249.103.1.5.in-addr.arpa.: NXDOMAIN
>
Tks so much,
NTQ
I've tried to modified the file and do rndc reconfig but it still can not work.
Event I reboot the server.
The file:
$TTL 86400
@ IN SOA master.ntqlab.com. root.master.ntqlab.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimium TTL
)
IN NS master.ntqlab.com.
249 IN PTR master.ntqlab.com.
164 IN PTR client.ntqlab.com.
And the result:
> master
Server: 5.1.103.249
Address: 5.1.103.249#53
Name: master.ntqlab.com
Address: 5.1.103.249
> 5.1.103.249
Server: 5.1.103.249
Address: 5.1.103.249#53
** server can't find 249.103.1.5.in-addr.arpa.: NXDOMAIN
>
Tks so much,
NTQ