Link to home
Start Free TrialLog in
Avatar of klute
klute

asked on

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
Avatar of ahoffmann
ahoffmann
Flag of Germany image

> 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

Avatar of MFCRich
MFCRich

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.
Avatar of klute

ASKER

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.
Avatar of klute

ASKER

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
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
Avatar of klute

ASKER

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
Avatar of klute

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of MFCRich
MFCRich

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> /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
Avatar of klute

ASKER

That did it thanks a lot.