[SOLVED] BIND (can't ping hostnames, but can ping IPs)
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
[SOLVED] BIND (can't ping hostnames, but can ping IPs)
I am running centOS 6.3 in a virtualized vmware environment.
Host: ESXI 5.1
Using: Vsphere Client
I have installed BIND on my centOS svr.
I have properly edited my iptables to configure port 53 through the firewall with both udp/tcp.
I have edited named.conf and entered my IP and loopback in to "listen-on port 53"
I have also done { localhost; IP/26; }; in the allow-query section
/etc/sysconfig/network-scripts/ifcfg-eth0 looks like this:
DEVICEE="eth0"
BOOTPROTO=none
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
DOMAIN=localhost
UUID="blah"
HWADDR=MAC
NETMASK=MASK
IPADDR=IP
PREFIX=26
GATEWAY=GATEWAY
DOMAIN=localhost
DNS1=1...
PEERDNS=no
/etc/resolv.conf looks like this:
domain localhost
nameserver IP of machine
I have restarted everything, but I can't seem to figure out why I cannot dig (google.com) or ping google.com or any other host name for that.
Please help!!!!
Host: ESXI 5.1
Using: Vsphere Client
I have installed BIND on my centOS svr.
I have properly edited my iptables to configure port 53 through the firewall with both udp/tcp.
I have edited named.conf and entered my IP and loopback in to "listen-on port 53"
I have also done { localhost; IP/26; }; in the allow-query section
/etc/sysconfig/network-scripts/ifcfg-eth0 looks like this:
DEVICEE="eth0"
BOOTPROTO=none
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
DOMAIN=localhost
UUID="blah"
HWADDR=MAC
NETMASK=MASK
IPADDR=IP
PREFIX=26
GATEWAY=GATEWAY
DOMAIN=localhost
DNS1=1...
PEERDNS=no
/etc/resolv.conf looks like this:
domain localhost
nameserver IP of machine
I have restarted everything, but I can't seem to figure out why I cannot dig (google.com) or ping google.com or any other host name for that.
Please help!!!!
Re: BIND (can't ping hostnames, but can ping IPs)
Can you print the contents of the following:
[code]
ping google.com && cat /etc/resolv.conf
[/code]
Edit: Just realised you have already printed the contents of resolv.conf.
Make sure that your resolv.conf looks like the following:
/etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
[code]
ping google.com && cat /etc/resolv.conf
[/code]
Edit: Just realised you have already printed the contents of resolv.conf.
Make sure that your resolv.conf looks like the following:
/etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
Re: BIND (can't ping hostnames, but can ping IPs)
[quote]
drewsymo wrote:
Can you print the contents of the following:
[code]
ping google.com && cat /etc/resolv.conf
[/code]
Edit: Just realised you have already printed the contents of resolv.conf.
Make sure that your resolv.conf looks like the following:
/etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4[/quote]
I am using BIND so I want to point everything back to my internal IP of the machine or local loopback.
So therefore I wouldn't want my resolv.conf to point to those DNS servers.
I need to them pointed back to me or 127.0.0.1
Still confused! :-(
Perhaps it may be something in the named.conf that is messed up?!
drewsymo wrote:
Can you print the contents of the following:
[code]
ping google.com && cat /etc/resolv.conf
[/code]
Edit: Just realised you have already printed the contents of resolv.conf.
Make sure that your resolv.conf looks like the following:
/etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4[/quote]
I am using BIND so I want to point everything back to my internal IP of the machine or local loopback.
So therefore I wouldn't want my resolv.conf to point to those DNS servers.
I need to them pointed back to me or 127.0.0.1
Still confused! :-(
Perhaps it may be something in the named.conf that is messed up?!
-
- Posts: 315
- Joined: 2012/09/15 21:06:54
Re: BIND (can't ping hostnames, but can ping IPs)
Maybe you should try what drewsymo suggested? That would help to narrow down the problem. It it works, then your problem is related to your local instance of named.
Re: BIND (can't ping hostnames, but can ping IPs)
Okay, so your setup should be:
/etc/hosts
127.0.0.1 localhost
/etc/resolv.conf
nameserver 127.0.0.1 (or localhost)
/etc/named.conf (in your options {} statement)
listen-on { localhost; };
allow-query { localhost; };
recursion yes;
allow-recursion { localhost; };
service named restart
If this doesn't work directly, try disabling your iptables (service iptables stop) and then do a dig to confirm any rules are not interfering with your setup.
/etc/hosts
127.0.0.1 localhost
/etc/resolv.conf
nameserver 127.0.0.1 (or localhost)
/etc/named.conf (in your options {} statement)
listen-on { localhost; };
allow-query { localhost; };
recursion yes;
allow-recursion { localhost; };
service named restart
If this doesn't work directly, try disabling your iptables (service iptables stop) and then do a dig to confirm any rules are not interfering with your setup.
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
Re: BIND (can't ping hostnames, but can ping IPs)
[quote]
drewsymo wrote:
Okay, so your setup should be:
/etc/hosts
127.0.0.1 localhost
/etc/resolv.conf
nameserver 127.0.0.1 (or localhost)
/etc/named.conf (in your options {} statement)
listen-on { localhost; };
allow-query { localhost; };
recursion yes;
allow-recursion { localhost; };
service named restart
If this doesn't work directly, try disabling your iptables (service iptables stop) and then do a dig to confirm any rules are not interfering with your setup.[/quote]
Thanks for all the replies everyone!
I have figured out the problem
NTP was not set up properly!
Solved!
drewsymo wrote:
Okay, so your setup should be:
/etc/hosts
127.0.0.1 localhost
/etc/resolv.conf
nameserver 127.0.0.1 (or localhost)
/etc/named.conf (in your options {} statement)
listen-on { localhost; };
allow-query { localhost; };
recursion yes;
allow-recursion { localhost; };
service named restart
If this doesn't work directly, try disabling your iptables (service iptables stop) and then do a dig to confirm any rules are not interfering with your setup.[/quote]
Thanks for all the replies everyone!
I have figured out the problem
NTP was not set up properly!
Solved!
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
Re: BIND (can't ping hostnames, but can ping IPs)
I am actually getting an error though but it seems like DNS is working fine!
Errors look like this when I ping a host:
Mar 30 18:12:52 pcrepair named[2075]: error (network unreachable) resolving ' 39.225.125.74.in-addr.arpa/PTR/IN': 2001:500:13::63#53
Mar 30 18:12:52 pcrepair named[2075]: error (network unreachable) resolving ' 74.in-addr.arpa/DS/IN': 2001:13c7:7010::53#53
I still get data back though, but still getting these errors.
I have read up on it, and I am thinking it has something to do with ipv6.
I may be wrong though.
Any ideas??
Errors look like this when I ping a host:
Mar 30 18:12:52 pcrepair named[2075]: error (network unreachable) resolving ' 39.225.125.74.in-addr.arpa/PTR/IN': 2001:500:13::63#53
Mar 30 18:12:52 pcrepair named[2075]: error (network unreachable) resolving ' 74.in-addr.arpa/DS/IN': 2001:13c7:7010::53#53
I still get data back though, but still getting these errors.
I have read up on it, and I am thinking it has something to do with ipv6.
I may be wrong though.
Any ideas??
[SOLVED] BIND (can't ping hostnames, but can ping IPs)
Do you have an ipv6 connection?
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
Re: BIND (can't ping hostnames, but can ping IPs)
[quote]
TrevorH wrote:
Do you have an ipv6 connection?[/quote]
Ok here is what I have done so far:
Disabled ipv6 on esxi host
Disabled ipv6 on centos vm
Disabled ipv6 in named.conf
Disabled ipv6 in /etc/sysconfig/named with OPTIONS="-4"
I am still getting these errors:
Apr 2 15:41:07 pcrepair named[1922]: error (network unreachable) resolving 'google.com/A/IN': 2001:503:231d::2:30#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'com/DS/IN': 2001:500:2f::f#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'r.arin.net/A/IN': 2001:7fd::1#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'r.arin.net/AAAA/IN': 2001:7fd::1#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving '65.225.125.74.in-addr.arpa/PTR/IN': 2001:500:14:6050:ad::1#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving 'in-addr.arpa/DS/IN': 2001:500:1::803f:235#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '74.in-addr.arpa/DS/IN': 2001:500:13::73#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '125.74.in-addr.arpa/DS/IN': 2001:5a0:10::2#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '74.in-addr.arpa/DNSKEY/IN': 2001:500:31::63#53
Generated from ping google.com
TrevorH wrote:
Do you have an ipv6 connection?[/quote]
Ok here is what I have done so far:
Disabled ipv6 on esxi host
Disabled ipv6 on centos vm
Disabled ipv6 in named.conf
Disabled ipv6 in /etc/sysconfig/named with OPTIONS="-4"
I am still getting these errors:
Apr 2 15:41:07 pcrepair named[1922]: error (network unreachable) resolving 'google.com/A/IN': 2001:503:231d::2:30#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'com/DS/IN': 2001:500:2f::f#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'r.arin.net/A/IN': 2001:7fd::1#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving 'r.arin.net/AAAA/IN': 2001:7fd::1#53
Apr 2 15:41:08 pcrepair named[1922]: error (network unreachable) resolving '65.225.125.74.in-addr.arpa/PTR/IN': 2001:500:14:6050:ad::1#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving 'in-addr.arpa/DS/IN': 2001:500:1::803f:235#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '74.in-addr.arpa/DS/IN': 2001:500:13::73#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '125.74.in-addr.arpa/DS/IN': 2001:5a0:10::2#53
Apr 2 15:41:09 pcrepair named[1922]: error (network unreachable) resolving '74.in-addr.arpa/DNSKEY/IN': 2001:500:31::63#53
Generated from ping google.com
-
- Posts: 6
- Joined: 2013/03/29 00:32:17
- Contact:
Re: [SOLVED] BIND (can't ping hostnames, but can ping IPs)
SOLVED
disabled ipv6 at the kernel and restarted server.
Edit: /etc/grub.conf
ipv6.disable=1
Create this file /etc/modprobe.d/disable-ipv6 and then add in the line: options ipv6 disable=1
Make sure if you are having the same problem as me run ifconfig on restart.
Thank you all.
disabled ipv6 at the kernel and restarted server.
Edit: /etc/grub.conf
ipv6.disable=1
Create this file /etc/modprobe.d/disable-ipv6 and then add in the line: options ipv6 disable=1
Make sure if you are having the same problem as me run ifconfig on restart.
Thank you all.