LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-21-2013, 01:53 AM   #1
reuven_l
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Rep: Reputation: Disabled
host $(HOST)


hello,

I am trying to issue the command /usr/bin/host $(HOST) and get the following reply from server :
;; connection timed out; no servers could be reached

server is in DMZ.

while issing the same command in production vlan it returns hostname and IP.

please assist


regards,
Reuven
 
Old 10-21-2013, 03:09 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Check that the variable $HOST exists.
echo $HOST

Next check what name servers are configured
cat /etc/resolv.conf

Then see that you can reach them
ping -c 1 -w 2 your_dns_server1
ping -c 1 -w 2 your_dns_server2

If not check check your network settings
ip link
ip addr
ip route

Check iptables rules
iptables -L OUTPUT
iptables -L INPUT
 
Old 10-21-2013, 07:07 AM   #3
reuven_l
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,
thanks for your quick reply.

our DMZ environment does not use DNS therefor ping to DNS server will not help.
looks like /usr/bin/host is using DNS and I would liker to bypass it if possible.

regards,
Reuven
 
Old 10-21-2013, 08:13 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by reuven_l View Post
our DMZ environment does not use DNS therefor ping to DNS server will not help.
Just ping an ip address. No need for hostnames. Or use a hostname thats is in your local dns database a.k.a. /etc/hosts.

Quote:
Originally Posted by reuven_l View Post
looks like /usr/bin/host is using DNS and I would liker to bypass it if possible.
host does what host does resolve a hostname to an ip address. Dunno if there are any swtiches or options to it but I doubt it.
So what are you trying to achieve? Maybe we can just work another route.
 
1 members found this post helpful.
Old 10-21-2013, 08:29 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,485

Rep: Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774
see man host, it begins with:
host - DNS lookup utility
host is a simple utility for performing DNS lookups.
....
usage: host name [server]
name is the domain name that is to be looked up. It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which case host will by default perform a reverse lookup for that address. server is an optional argument which is either the name or IP address of the name server that host should query instead of the server or servers listed in /etc/resolv.conf.

so you can specify the ip of dns (as server) if you would like to do so.
 
Old 10-21-2013, 10:06 AM   #6
reuven_l
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks very much zhjim and pan64 :-)
 
Old 10-21-2013, 11:07 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,485

Rep: Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774Reputation: 7774
glad to help you
you just need to press YES if you want to say THANKS.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
host: dst_lib_init: openssl failure in chroot jail when executing host binary golden_boy615 Linux - General 0 09-10-2012 08:16 AM
Forwarding ping packets from one 1st host to 2nd host via 2rd host sachee Linux - Networking 1 09-25-2011 02:51 PM
VirtualBox: Slackware64 host and guest; NFS mount from host fails catkin Linux - Virtualization and Cloud 0 11-15-2010 07:54 AM
try install host ; bind9-host uninstalled , how to undo sudo apt-get install host? shojaru Linux - Newbie 0 06-11-2009 01:45 AM
Required to achieve host to host communication via USB file transfer cable may1284 Linux - General 1 03-14-2007 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration