LinuxQuestions.org
Help answer threads with 0 replies.
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 03-12-2011, 07:05 AM   #1
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
dns resolution and nmap works by name, ssh or rdesktop only by IP


I have a local dns with a slave zone forwarding to my w0rkplace across a vpnc
tunnel.
Together with adding the work domain to the resolv.conf searchlist, I can do full
(and reverse) DNS lookups.
[walter@woodpecker ~]$ ping wsppb177c
PING wsppb177c.zds.ages.at (172.18.55.209) 56(84) bytes of data.
64 bytes from wsppb177c.ages.at (172.18.55.209): icmp_req=1 ttl=63 time=14.8 ms
64 bytes from wsppb177c.ages.at (172.18.55.209): icmp_req=2 ttl=63 time=14.5 ms
^C
--- wsppb177c.zds.ages.at ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 14.529/14.666/14.804/0.183 ms
[walter@woodpecker ~]$ nmap wsppb177c

Starting Nmap 5.21 ( http://nmap.org ) at 2011-03-12 13:28 CET
Nmap scan report for wsppb177c (172.18.55.209)
Host is up (0.047s latency).
Not shown: 992 closed ports
PORT STATE SERVICE
22/tcp open ssh
.....
Nmap done: 1 IP address (1 host up) scanned in 2.09 seconds

But trying ssh to the same (linux) box gives:
[walter@woodpecker ~]$ ssh wsppb177c
ssh: Could not resolve hostname wsppb177c: Name or service not known
Yes, getent hosts works:
[walter@woodpecker ~]$ getent hosts wsppb177c
172.18.55.209 wsppb177c.zds.ages.at
and
[walter@woodpecker ~]$ host 172.18.55.209
209.55.18.172.in-addr.arpa domain name pointer wsppb177c.ages.at.
works as well (though omitting the zds. part),
but
[walter@woodpecker ~]$ export LC_ALL=C; rdesktop wsppb177c
ERROR: getaddrinfo: Name or service not known

/etc/nsswitch.conf contains files dns entries for hosts resolution.

Some bug in Mandriva or PEBKAC? ;-)
 
Old 03-12-2011, 07:17 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
If you have to ask, I think you've already answered! ;-)
Just kidding...

This is unusual. Would you include the contents of your
/etc/resolv.conf and /etc/nsswitch.conf files?
 
Old 03-12-2011, 11:48 AM   #3
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Original Poster
Rep: Reputation: 17
Thanks for your attention :)

First (someone was worried about obfuscating the IPs) - these are all addresses of the "private" range and the DNS is inside the vpn as well.

Ok. here my /etc/resolv.conf:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search zds.ages.at ages.at woodpecker.dyndns-at-home.com
nameserver 172.18.64.50
nameserver 172.18.64.49
nameserver 195.34.133.21
search woodpecker.dyndns-at-home.com zds.ages.at ages.at

(I should of course disable the resolvconf "service" and omit the automagical part ... but I tried and it didn't matter)

/etc/nsswitch.confasswd: compat
shadow: files nis
group: compat

hosts: files dns wins mdns4_minimal
networks: files dns

services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files

bootparams: files
automount: files dns nis
aliases: files dns

But then, again, dns resolution seems to work ...

Anything I can do to debug?
 
Old 03-14-2011, 08:18 PM   #4
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
I don't see anything that doesn't look right, apart from the two
search lines in resolv.conf. That might be right, but I have
never seen a resolv.conf with two search lines.

I'm not sure how to go about debugging this. Just for grins I
would try putting entries in your /etc/hosts file to see if that
works.

For example:

172.18.55.209 wsppb177c.zds.ages.at wsppb177c
 
  


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
I want to know about NMAP, how it works, its benefits, its advantages? mrinaljidal Linux - Security 2 02-17-2011 01:17 AM
Local Host Name & DNS Resolution Problem (Works on Windows but not on Linux) sheps126 Linux - Networking 7 01-03-2009 10:11 AM
Local network DNS resolution fails, but DNS resolution to internet is OK farge Linux - Networking 6 05-28-2008 11:49 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
ping works, nmap and ssh do not acampbell Linux - Networking 5 07-24-2006 01:27 PM

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

All times are GMT -5. The time now is 09:38 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