Solved

I cannot Telnet nor FTP into my Linux box from windows

Posted on 2002-05-07
10
429 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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 200 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now