Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

I cannot Telnet nor FTP into my Linux box from windows

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
klute
Asked:
klute
  • 5
  • 3
  • 2
1 Solution
 
ahoffmannCommented:
> 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
 
MFCRichCommented:
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
 
kluteAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
kluteAuthor Commented:
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
 
ahoffmannCommented:
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
 
kluteAuthor Commented:
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
 
kluteAuthor Commented:
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
 
MFCRichCommented:
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
 
ahoffmannCommented:
> /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
 
kluteAuthor Commented:
That did it thanks a lot.
 
0

Featured Post

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.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now