I am trying to enable IPv6 on the telnet server running on Ubuntu 16.04, but I cannot.

My configuration files look like the following.

/etc/xinetd.d/telnet

service telnet
{
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        flags           = REUSE IPv6
}

/etc/inetd.conf

telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

After /etc/init.d/xinetd restart, the telnet server is listening on only IPv4 address, not IPv6 address:

# netstat -nap|grep xinet
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      4592/xinetd     
unix  2      [ ]         DGRAM                    31655    4592/xinetd 

As a result, when I telnet, I see this error message:

# telnet -6 ::1
Trying ::1...
telnet: Unable to connect to remote host: Connection refused

On the server, I have an active network interface with IPv6 address enabled, and I have been running IPv6-enabled SSH server without any problem. But somehow I cannot enable IPv6 for telnet server.

Any help is appreciated.

share|improve this question

I saw this solution here where The problem is solved by adding flags = IPv6 line to /etc/xinetd.d/echo file (but in your case it would be /etc/xinetd.d/telent:

service echo
{
    disable     = no
    type        = INTERNAL
    id      = echo-stream
    socket_type = stream
    protocol    = tcp
        flags           = IPv6  
    user        = root
    wait        = no
}                                                                               


service echo
{
    disable     = no
    type        = INTERNAL
    id      = echo-dgram
    socket_type = dgram
    protocol    = udp
        flags           = IPv6  
    user        = root
    wait        = yes
}   
share|improve this answer
    
I already tried "flags = IPv6", but that does not seem to help. – dan Aug 20 '17 at 20:17

I faced this issue too. I was able to resolve it by adding the following lines in /etc/xinetd.conf, and do, service xinetd restart.

service telnet

         {
                 socket_type         = stream
                 wait                = no
                 nice                = 10
                 user                = root
                 server              = /usr/sbin/in.telnetd
                 flags               = IPv6
          }

Thanks

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.