# [solved] telnetd

## massctrl

Hi,

I'm trying to install and test telnetd and xinetd for learning purposes.

So i did 'emerge net-kit\telnet' and 'emerge xinetd' which worked out fine.

Did 'rc-update xinetd add default' to start up automaticly works like a breeze:

1    If i try to start telnetd manually it says :

      telnetd: getpeername: Socket operation on non-socket

2    If i check the 'man telnetd' i get a telnetd man file with options that 

      are not  available in telnetd such as the -a switch.  

      But if i start  'telnetd -debug' then i can telnet in.

3    my telnet xinetd file which sits in /etc/xinetd.d/telnet says

     service telnet

     {

        flags           = REUSE

        socket_type     = stream

        wait            = no

        user            = root

        server          = /usr/sbin/tcpd /usr/sbin/in.telnetd -debug

        log_on_failure += USERID

        disable         =no

     }

4    My /etc/hosts.allow which i had to make manually contains nothing

      My /etc/hosts.deny which i had to make manualy contains:

                in.telnetd: ALL EXCEPT LOCAL

I still can't login  :Sad:  Maybe this sounds trivial but to me it isn't, can someone help me out and get this thing working?

Thanks in advance

PS: pls don't lecture about you should use ssh instead of telnet blah, i know and that's not the answer.Last edited by massctrl on Wed Oct 20, 2004 7:05 pm; edited 1 time in total

----------

## grimshaw

No lectures on telnet... it has its uses.

Lets set up your hosts safely for the time being...

/etc/hosts.deny: 

ALL: ALL

/etc/hosts.allow: 

in.telnetd: 192.168.0.1

Obviously, set the hosts.allow ip address to the machine you want to allow access and not the number I used above.

Next, let's check your xinetd settings...

```
service telnet

{

       flags          = REUSE

       socket_type    = stream

       wait           = no

       user           = root

       server         = /usr/sbin/in.telnetd

       log_on_failure += USERID

       log_on_failure   = USERID ATTEMPT

       disable        = no

}

```

Restart xinetd.

Report anything in your logs.

- John

----------

## massctrl

Argl,

Indeed this helped me out !! The problem was that I mixed up inetd with xinetd.

xinetd has it's own built in tcp wrapper ! Thus no need to put /usr/sbin/tcpd in front of the telnetdaemon in xinetd.conf.  that's where the problem came from.

Thank you very much!

----------

