0

I want Ubuntu to be telent server, for which I installed telnetd:

ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ sudo apt install telnetd -y
[sudo] password for ngadre:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  gir1.2-goa-1.0
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  telnetd
0 upgraded, 1 newly installed, 0 to remove and 162 not upgraded.
Need to get 38.8 kB of archives.
After this operation, 114 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 telnetd amd64 0.17-41.2build1 [38.8 kB]
Fetched 38.8 kB in 1s (48.4 kB/s)
Selecting previously unselected package telnetd.
(Reading database ... 227457 files and directories currently installed.)
Preparing to unpack .../telnetd_0.17-41.2build1_amd64.deb ...
Unpacking telnetd (0.17-41.2build1) ...
Setting up telnetd (0.17-41.2build1) ...
Adding user telnetd to group utmp
Note: xinetd currently is not fully supported by update-inetd.
Please consult /usr/share/doc/xinetd/README.Debian and itox(8).
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
Processing triggers for man-db (2.9.1-1) ...


ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ ps aux | grep inet
root         110  0.0  0.0      0     0 ?        I<   Apr06   0:00 [inet_frag_wq]
root     3444843  0.0  0.0   7936  2160 ?        Ss   18:00   0:00 /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

netstat -plnt  shows that tcp6:23 port is listening but tcp v4 telnet is not listening.
ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3338537/cupsd
tcp        0      0 0.0.0.0:5938            0.0.0.0:*               LISTEN      4202/teamviewerd
tcp        0      0 127.0.0.1:5939          0.0.0.0:*               LISTEN      4202/teamviewerd
tcp        0      0 127.0.0.1:6015          0.0.0.0:*               LISTEN      3443323/sshd: ngadr
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      3444365/sshd: ngadr
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      2747323/systemd-res
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1001058/sshd: /usr/
tcp6       0      0 ::1:6015                :::*                    LISTEN      3443323/sshd: ngadr
tcp6       0      0 ::1:6010                :::*                    LISTEN      3444365/sshd: ngadr
tcp6       0      0 :::5938                 :::*                    LISTEN      4202/teamviewerd
tcp6       0      0 ::1:631                 :::*                    LISTEN      3338537/cupsd
tcp6       0      0 :::23                   :::*                    LISTEN      3446333/xinetd
tcp6       0      0 :::22                   :::*                    LISTEN      1001058/sshd: /usr/


connecting to telnet using "telnet 192.168.0.10" fails:
ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ telnet 192.168.0.10
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.
Connection closed by foreign host.

How to enable telnet for ipv4 ?

Firewall is disabled, and I don't see any DROP/DENY rule in iptables.

My xinetd.conf is as below:

defaults
{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info

instances = 60
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}

includedir /etc/xinetd.d
RootPhoenix
  • 101
  • 2
  • check `/etc/hosts.allow` and `/etc/hosts.deny` – AlexD Jul 17 '23 at 15:29
  • They are empty files – RootPhoenix Jul 17 '23 at 16:09
  • I didn't notice that it is not listening on IPv4. Then you need to check `xinetd` configuration. – AlexD Jul 17 '23 at 16:15
  • It [listens on IPv4](https://serverfault.com/questions/755765/httpd-listening-in-ipv6-according-netstat-but-reacheable-in-ipv4). Note that you get connection closed, not connection refused or timed out. Your problem is somewhere else; it's not that `telnetd` doesn't listen. Check your logs for why it closes the connection. – vidarlo Jul 18 '23 at 08:14
  • 1
    I think that the message `Note: xinetd currently is not fully supported by update-inetd. Please consult /usr/share/doc/xinetd/README.Debian and itox(8). update-inetd: warning: cannot add service, /etc/inetd.conf does not exist` can be related to your problem. Did you check the mentioned documentation? – raj Jul 18 '23 at 10:16

0 Answers0