1
2
Telnet connection with echo service succeeds for localhost
and 127.0.0.1
host names, but fails with ::1
host name:
alex@u120432:~$ telnet localhost 7 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 123 123 ^] telnet> q Connection closed. alex@u120432:~$ telnet ::1 7 Trying ::1... telnet: Unable to connect to remote host: Connection refused alex@u120432:~$
My own program trying to talk using IPv6 address fails as well. Why IPv6 address is rejected?
OS: Ubuntu 12.04 32 bit.
Additional information:
For any TCP/UDP server-client programs (not only telnet + echo) I tried different host names. Assuming that computer IP address is 10.90.185.73 (fe80::21b:21ff:fe5e:28af), I tested the following options:
localhost - works 127.0.0.1 - works ::1 - Connection refused 10.90.185.73 - works computer-name - works ::ffff:10.90.185.73 - works fe80::21b:21ff:fe5e:28af - Connection refused
can you paste your
/etc/xinetd.d/telnet
setting here. – max – 2012-11-29T11:17:19.710@max: /etc/xinetd.d/telnet: No such file or directory – Alex F – 2012-11-29T11:25:06.790
ok ubuntu right sorry my mistake... – max – 2012-11-29T12:00:44.943
Run
netstat -ntlp
and you'll probably find your service to be listening on IPv4 only. Change your echo service to bind to IPv6 as well. – gertvdijk – 2012-11-29T12:30:23.817@gertvdijk - "Change your echo service to bind to IPv6 as well" - how exactly can I do this? Echo service itself it not so interesting to me, my problem is that any program doesn't work with IPv6 address. – Alex F – 2012-11-29T12:37:48.343