old-www/LDP/LG/issue54/tag/3.html

285 lines
12 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3D.j">
<TITLE>The Answer Guy 54: Can't telnet to Linux server</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P> <hr>
<!-- *** BEGIN navbar *** :::::::::::::::::::::::::::::::::::::::::::::::: -->
<p align="center">
<A HREF="../lg_bytes54.html"><IMG ALT="[ Prev ]"
SRC="../../gx/navbar/prev.jpg"
WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom" >
<A HREF="../index.html"><IMG ALT="[ Table of Contents ]"
SRC="../../gx/navbar/toc.jpg"
WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<A HREF="../../index.html"><IMG ALT="[ Front Page ]"
SRC="../../gx/navbar/frontpage.jpg"
WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<A HREF="../../faq/index.html"><IMG ALT="[ FAQ ]"
SRC="../../gx/navbar/faq.jpg"
WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/right.jpg"
WIDTH="15" HEIGHT="45" ALIGN="bottom" >
<A HREF="../lg_tips54.html"><IMG ALT="[ Next ]"
SRC="../../gx/navbar/next.jpg"
WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<!-- *** END navbar *** :::::::::::::::::::::::::::::::::::::::::::::::::: -->
</p>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
LinuxCare,
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<!-- begin 3 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Can't telnet to Linux server</H3>
<p><strong>From kd on Mon, 01 May 2000
</strong></p>
<!-- ::
Can't telnet to Linux server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:: -->
<P><STRONG>
I recently installed Suse Linux on a machine to be a server, but I
cannot telnet to the linux server from my other machines. can you help?
</STRONG></P>
<P><STRONG>
~kelly
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Short answer: Probably TCP Wrappers and the old "double reverse lookup
problem." Try adding an entry in <TT>/etc/hosts</TT> to refer back to your
client(s) and make sure that your <TT>/etc/nsswitch.conf</TT> and <TT>/etc/hosts.conf</TT>
are configured to honor "files" over DNS and NIS.
</BLOCKQUOTE>
<BLOCKQUOTE>
You could have been a bit more vague. You could have
left out the word "telnet"
<IMG SRC="../../gx/dennis/smily.gif" ALT=";)"
height="24" width="20" align="middle">?
</BLOCKQUOTE>
<BLOCKQUOTE>
When asking people technical support questions you have to ask:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
How many possible causes are there to this problem?
How many of them have I eliminated?
How have I eliminated them?
Can I eliminate some more?
What is the error message I'm getting (if any)?
What was I expecting?
What happened that didn't match that/those expection(s)?
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
For example: Can you ping the server from the client system?
(That eliminates many IP addressing, routing, firewall and
packet filtering questions). Can you telnet from that client to
any other server? (That eliminates most of the questions that
relate to proper client software/system configuration and function).
Can I access any other service on this client? (Web server, file
or print services, etc.)
</BLOCKQUOTE>
<BLOCKQUOTE>
Then you ask: What did I expect to happen when I telnetted to that
system? I'd expect to get a set of responses something like:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
Trying 123.45.67.89
Connected to myserver.mydomain.not
Escape character is '^]'.
<A HREF="http://www.debian.org/">Debian</A> GNU/Linux 2.2 myserver.mydomain.not
myserver login:
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
So, what did you get. Did you see the "Trying" line? That would
mean that the telnet DNS or other hostname lookup returned something.
Did the IP address in the trying line match that of your new server?
That would mean that your DNS is correct! Did you get the "connected
to" line? That suggests that the routing is correct. Did it just
sit there for a long time? How long? What if you wait for five or
ten minutes? Does it eventually connect?
</BLOCKQUOTE>
<BLOCKQUOTE>
It sounds like you have the old "double reverse DNS" problem. You
are probably using DNS and you probably don't have proper reverse
DNS (PTR) records for you client system(s). Do a search in the
Linux Gazette archives for several discussions on this.
</BLOCKQUOTE>
<BLOCKQUOTE>
When you are getting free software and free support, it's important
to do your homework. I typically will put about 10 hours into
trying to solve a problem before I'll write up a question to post
to the newsgroups, mailing lists, authors/maintainers, etc.
</BLOCKQUOTE>
<BLOCKQUOTE>
Of course I can understand part of the problem you might be
facing. It sounds like you have little or no Linux experience,
or at least little or no experience in setting up Linux networking.
</BLOCKQUOTE>
<BLOCKQUOTE>
You probaby don't know all of the elements that go into
"telnetting into your server." Here's the basic rundown:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
You have to have a client (telnet command). That has to be on a
system with TCP/IP installed, configured and working. It must
have an IP address and a route to your server.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
You have to have a server (in.telnetd). It would normally be
launched on demand by a dispatch program (inetd) which would be
reading configuration out of a configuration file (<TT>/etc/inetd.conf</TT>).
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
On Linux systems the <TT>/etc/inetd.conf</TT> is usually configured to run
most programs under an access control and logging utility called
"TCP Wrappers" (<TT>/usr/sbin/tcpd</TT>). That utility refers to a couple of
configuration files (<TT>/etc/hosts.allow</TT>, and <TT>/etc/hosts.deny</TT>) and it
does some "paranoid" consistency checking to try and ensure that the
client "is who he claims to be." The specifics of this paranoid
checking are referred to as a "double reverse DNS lookup."
</BLOCKQUOTE>
<BLOCKQUOTE>
This requires that the client system's IP address somehow be
registered in some sort of naming service that the server is configured
to query. The easiest of these in most cases is to simply add the
appropriate IP address (and some arbitrary name) int the <TT>/etc/hosts</TT>
file. A better way is to add an appropriate PTR record to your
DNS zone.
</BLOCKQUOTE>
<BLOCKQUOTE>
Linux uses a modular name services resolution system. Newer
versions of Linux use the <TT>/etc/nsswitch.conf</TT> files to control the
list of name services that are used for each name space (users/accounts,
groups, hosts and networks, services, mail aliases, file server maps,
etc). In most cases you wouldn't have to modify the nsswitch.conf
to make it look at the <TT>/etc/hosts</TT> file. In other cases you might.
</BLOCKQUOTE>
<BLOCKQUOTE>
In previous months I've gone into greater detail about how to
troubleshoot problems in accessing TCP services on Linux systems.
Look for references to tcpdump and strace to find out more.
</BLOCKQUOTE>
<BLOCKQUOTE>
(Summary: You can replace the entry in <TT>/etc/inetd.conf</TT> with a
wrapper script that runs 'strace' on the program, thus logging
what the program is trying to do in great detail. You can also
run 'tcpdump' on any machine on the local LAN segment, seeing
the traffic between your client and server in great detail).
</BLOCKQUOTE>
<BLOCKQUOTE>
Unfortunately these tools are rather advanced, very powerful
and coresponding difficult to use effectively. (You can
probably get the information from them pretty easily <TT>--</TT> the
problem is to configure them to provide just the info you
need and in parsing and understanding what they tell you).
</BLOCKQUOTE>
<BLOCKQUOTE>
Hopefully I've guessed correctly on what you problem is.
Otherwise search through my back issues and the FAQ and
do lots of troubleshooting. Ask a more detailed question.
</BLOCKQUOTE>
<!-- sig -->
<!-- end 3 -->
<!--startcut ======================================================= -->
<P> <hr> </p>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2000, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 54 June 2000</H5>
<H6 ALIGN="center">HTML transformation by
<A HREF="mailto:star@tuxtops.com">Heather Stern</a> of
Tuxtops, Inc.,
<A HREF="http://www.tuxtops.com/">http://www.tuxtops.com/</A>
</H6>
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0">
<A HREF="../lg_answer54.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A>
<A HREF="../lg_answer54.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A> &nbsp;
<A HREF="13.html">13</A> &nbsp;
<A HREF="14.html">14</A> &nbsp;
<A HREF="15.html">15</A> &nbsp;
<A HREF="16.html">16</A> &nbsp;
<A HREF="17.html">17</A> &nbsp;
<A HREF="18.html">18</A>
<A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A></td>
<IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0">
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr>
<!-- *** BEGIN navbar *** :::::::::::::::::::::::::::::::::::::::::::::::: -->
<p align="center">
<A HREF="../lg_bytes54.html"><IMG ALT="[ Prev ]"
SRC="../../gx/navbar/prev.jpg"
WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom" >
<A HREF="../index.html"><IMG ALT="[ Table of Contents ]"
SRC="../../gx/navbar/toc.jpg"
WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<A HREF="../../index.html"><IMG ALT="[ Front Page ]"
SRC="../../gx/navbar/frontpage.jpg"
WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<A HREF="../../faq/index.html"><IMG ALT="[ FAQ ]"
SRC="../../gx/navbar/faq.jpg"
WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A>
<IMG ALT="" SRC="../../gx/navbar/right.jpg"
WIDTH="15" HEIGHT="45" ALIGN="bottom" >
<A HREF="../lg_tips54.html"><IMG ALT="[ Next ]"
SRC="../../gx/navbar/next.jpg"
WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A>
<!-- *** END navbar *** :::::::::::::::::::::::::::::::::::::::::::::::::: -->
</p>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->