Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-21-2013, 01:53 AM
|
#1
|
LQ Newbie
Registered: Oct 2013
Posts: 3
Rep:
|
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
|
|
|
10-21-2013, 03:09 AM
|
#2
|
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
|
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
|
|
|
10-21-2013, 07:07 AM
|
#3
|
LQ Newbie
Registered: Oct 2013
Posts: 3
Original Poster
Rep:
|
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
|
|
|
10-21-2013, 08:13 AM
|
#4
|
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
|
Quote:
Originally Posted by reuven_l
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
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.
|
10-21-2013, 08:29 AM
|
#5
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,485
|
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.
|
|
|
10-21-2013, 10:06 AM
|
#6
|
LQ Newbie
Registered: Oct 2013
Posts: 3
Original Poster
Rep:
|
thanks very much zhjim and pan64 :-)
|
|
|
10-21-2013, 11:07 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,485
|
glad to help you
you just need to press YES if you want to say THANKS.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 09:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|