?
Solved

I cannot Telnet nor FTP into my Linux box from windows

Posted on 2002-05-07
10
Medium Priority
?
456 Views
Last Modified: 2013-11-13
Hello
please forgive me for asking stupid questions.

But in any case I cannot Telnet nor FTP into my Linux box from windows

C:\>telnet 10.1.0.156
Connecting To 10.1.0.156...Could not open connection to the host, on port 23.
No connection could be made because the target machine actively refused it.

My guess is the telnet and FTP deamon are iether not strted nor configured Properly

here is what i did

I ran
/sbin/pidof inetd

It returns merely a blank line - what do I need to do to make inetd run
(shouldn't it be running by default? Since This is pretty well a vanilla installation of Mandrake 8.2

netstat -plant
Ports 21 and 23 are not active  nor open
This returns:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN

Also from the linux box i did telnet 127.0.0.1
and my connection is refused

I have also installed the packages using the GUI tools for ftp and telent Deamon but no luck.

So my question is this
How can i verify that the telnet daemon and FTp daemon are installed properly? and How would i start
the Telnet and FTP deamon?

Oh and one last thing
hosts.allow and deny do not have any entries in them.

Thanks in adnvace
0
Comment
Question by:klute
  • 5
  • 3
  • 2
10 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6995700
> the target machine actively refused it
either there is a firewall, somewhere, which rejects the packets, or you linux box does not allow remote connections.

> Also from the linux box i did telnet 127.0.0.1 and my connection is refused
do you have telnetd or rlogind enabled in /etc/inetd.conf

0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6996354
I believe Mandrake uses xinetd in place of inetd (but I'm a Redhat guy).

The command:

> ps ax | grep inet

should show you if either is running.

The command:

> rpm -qa | grep inet

should show if either is installed.

For the ftp and telnet servers try:

> rpm -qa | grep -i ftp    # for ftp packages
> rpm -qa | grep -i telnet # for telnet packages

to see if they are installed.

Assuming xinetd ---

In the directory '/etc/xinetd.d' you should find files 'telnet' and 'wu-ftp'. Each of these probably has a line that reads 'disable = yes'. Change the yes to no and restart xinetd.
0
 
LVL 1

Author Comment

by:klute
ID: 6997153
BTW this machine is activaly on a network not behind any firewalls.
I have a Windows machine and this linux machine both on mty desk i can ping between the 2 .
At any rate
Yes you are correct MFCRich
Mandrake uses xinetd
when i Vi xinetd.conf
i do not see anything about ftp or telnet in there
so how would i add them in there?

> ps ax | grep inet
shows that is is not running

i run
> rpm -qa | grep -i telnet # for telnet packages
i get that telnet client and telnet server are installed

and i also have gftp, lftp, and ftp server installed.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LVL 1

Author Comment

by:klute
ID: 6997158
I was thinking of adding this
in xinetd.conf

service telnet
{
  socket_type = stream
  protocol    = tcp
  wait        = no
  user        = nobody
  server      = /usr/sbin/in.telnetd
  server_args = "whatever"
  port        = 23
}

is this correct
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6997211
I'm not shure if you can it to /etc/xinetd.conf directly, probaly you need to write it into /etc/xinetd.d/telnetd and then use following in /etc/xinetd.conf
   includedir /etc/xinetd.d

AFAIK, you need to set
   user = root
0
 
LVL 1

Author Comment

by:klute
ID: 6997216
I was thinking of adding this
in xinetd.conf

service telnet
{
  socket_type = stream
  protocol    = tcp
  wait        = no
  user        = nobody
  server      = /usr/sbin/in.telnetd
  server_args = "whatever"
  port        = 23
}

is this correct
0
 
LVL 1

Author Comment

by:klute
ID: 6997248
You arte correct you cannot add it directly to /etc/xinetd.conf
i already had that entry in /etc/xinetd.d/telnetd
and this entry as well in  in /etc/xinetd.conf
  includedir /etc/xinetd.d

i bounced the server but it istill not running
0
 
LVL 4

Accepted Solution

by:
MFCRich earned 800 total points
ID: 6997277
As root:
> chkconfig --list

will show what is set to run when the server boots up. (this can be a long list). If xinetd is not set to run then:

> chkconfig --level 345 xinetd on
will set it to start at boot time.
> /etc/init.d/xinetd start

will start it.

DO NOT vi /etc/xinetd.conf! Look in the directory /etc/xinetd.d The files you want to edit are in there. See my original posting.

Then
> /etc/init.d/xinetd reload
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6997309
> /etc/init.d/xinetd reload
I prefer poor man's solution: kill -1 <pid-of-xinetd>
:-)

I'm not an xinetd expert either, but probably you need in /etc/xinetd.d/telnetd also:
    disable = no

To check if xinetd listens for connections, use:
   netstat -an|grep :23
you should get something like:
   tcp   0   0 0.0.0.0:23     0.0.0.0:*      LISTEN
0
 
LVL 1

Author Comment

by:klute
ID: 6997428
That did it thanks a lot.
 
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Fine Tune your automatic Updates for Ubuntu / Debian
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

568 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question