LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   neither dig nor host list my DNS address or Hoste Name (http://www.linuxquestions.org/questions/linux-newbie-8/neither-dig-nor-host-list-my-dns-address-or-hoste-name-805483/)

coryjsanders 05-02-2010 11:30 AM

neither dig nor host list my DNS address or Hoste Name
 
I have an IPPBX on a static private IP behind a firewall. The PBX is programmed with the host name as myhomeconnection.local. The primary DNS is the address of the router, the secondary is the address of the primary DNS of my provider, Cox. When I type dig cox.com or cox.net I get -bash: dig: command not found. I get the same thing if I type dig -x publicipofrouter I get the same thing if I use the host commands, host -t ptr publicip and host-t cname www.cox.com and host -t cname www.cox.net

I am trying to get my voicemail to email working on my Elastix box. Thinking of trying to put the host name of the DNS in the Host Name box instead of myhomeconnection.local

the primary and secondary DNS addresses I have programmed into the PBX (private IP of the router and primary DNS of Cox) are in the /etc/resolve.conf file. Thanks.

catkin 05-02-2010 11:46 AM

Quote:

Originally Posted by coryjsanders (Post 3954790)
When I type dig cox.com or cox.net I get -bash: dig: command not found.

That means the dig command itself is not found, not that cox.com or cox.net are not found. Similar for the host command. Try the nslookup command.

Quote:

Originally Posted by coryjsanders (Post 3954790)
the primary and secondary DNS addresses I have programmed into the PBX (private IP of the router and primary DNS of Cox) are in the /etc/resolve.conf file.

They should be in the /etc/resolv.conf file, that is without an e.

coryjsanders 05-02-2010 11:52 AM

nslooup command not found
 
the files are in /etc/resolv.conf indeed. Thanks. I tried this nslookup cox.com and nslookup 192.168.1.101. Both said -bash: nslookup: command not found

catkin 05-02-2010 12:04 PM

Quote:

Originally Posted by coryjsanders (Post 3954813)
the files are in /etc/resolv.conf indeed. Thanks. I tried this nslookup cox.com and nslookup 192.168.1.101. Both said -bash: nslookup: command not found

Two possibilities -- these commands are not installed or bash cannot find them.

Would be interesting to know what the PBX is running, what $PATH bash has, what's in resolv.conf and hosts, whether there's IP connectivity to the router and to the Internet, and to see if ping by name resolves DNS names. What's the output from
Code:

uname
uname -a
echo $PATH
ls /etc/*version*
cat /etc/hosts
cat /etc/resolv.conf
ping <IP of router>
ping <ip of primary DNS of provider>
ping 75.126.162.205 # linuxquestions.org -- we know this responds to pings
ping 24.248.73.200 # cox.com
ping cox.com


coryjsanders 05-02-2010 12:11 PM

resolv.conf
 
I'll try this when I return home. Thank you.

coryjsanders 05-02-2010 08:23 PM

catkin, please see below for your answers -- everything looks good on the pings until you get to Cox. Thanks!:

[root@myhomeconnection ~]# uname
Linux

[root@myhomeconnection ~]# uname -a
Linux myhomeconnection.local 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux

[root@myhomeconnection ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

[root@myhomeconnection ~]# ls /etc/*version*
ls: /etc/*version*: No such file or directory
[root@myhomeconnection ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
127.0.0.1 myhomeconnection.local

[root@myhomeconnection ~]# cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 68.105.28.12 (this is my provider's primary DNS)

ping router results:
--- 192.168.1.1 ping statistics ---
25 packets transmitted, 25 received, 0% packet loss, time 23997ms
rtt min/avg/max/mdev = 0.334/0.358/0.381/0.021 ms

ping primary DNS results: --- 68.105.28.12 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 12.182/19.248/21.586/3.562 ms


--- 75.126.162.205 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 132.876/153.863/193.978/28.375 ms
[root@myhomeconnection ~]#


[root@myhomeconnection ~]# ping 24.248.73.200
PING 24.248.73.200 (24.248.73.200) 56(84) bytes of data.
From 68.1.0.5 icmp_seq=3 Packet filtered
From 68.1.0.5 icmp_seq=5 Packet filtered
From 68.1.0.5 icmp_seq=6 Packet filtered
From 68.1.0.5 icmp_seq=7 Packet filtered
From 68.1.0.5 icmp_seq=8 Packet filtered

--- 24.248.73.200 ping statistics ---
8 packets transmitted, 0 received, +5 errors, 100% packet loss, time 6998ms

[root@myhomeconnection ~]#
[root@myhomeconnection ~]# ping cox.com
PING cox.com (24.248.75.200) 56(84) bytes of data.
From lkhndsrc01-pos0901.rd.at.cox.net (68.1.0.5) icmp_seq=1 Packet filtered
From lkhndsrc01-pos0901.rd.at.cox.net (68.1.0.5) icmp_seq=3 Packet filtered
From lkhndsrc01-pos0901.rd.at.cox.net (68.1.0.5) icmp_seq=4 Packet filtered
From lkhndsrc01-pos0901.rd.at.cox.net (68.1.0.5) icmp_seq=5 Packet filtered

--- cox.com ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3998ms

catkin 05-03-2010 04:04 AM

It didn't tell us which Linux OS is on the PBX (no /etc/*version* so try ls /etc/*release* instead) but it did show a comprehensive $PATH (so dig, hosts and nslookup are probably not installed) and both Internet connectivity and DNS name resolution. The ping cox.com output shows that cox.com was resolved to cox.net and that cox.net doesn't play nicely with ping. Try ping linuxquestions.org to both demonstrate name resolution and ping replies. Seems like it's all working for you :)


All times are GMT -5. The time now is 07:33 AM.