LoginSignup
7
7

More than 5 years have passed since last update.

ubuntuでtelnetdをIPv4で上げる方法

Posted at

ubuntuでtelnetサーバを立てる必要があったため、
何も考えずに以下のようにインストールしました。

apt-get install inetutils-inetd
apt-get install telnetd

で、telnetクライアントで接続してみるとConnection refusedと出て、うまくいかない。

netstat を見てみると、

tcp6       0      0 :::23                   :::*                    LISTEN

なんとtelnetの23番ポートはIPv6で待ち受けている!

そこで公式マニュアルに従ってinetdの設定を変えて、telnetをIPv4で上げるようにする。

具体的には/etc/inetd.conftcpの部分をtcp4にすればOK

telnet          stream  tcp4    nowait  root    /usr/sbin/tcpd  /usr/sbin/in.telnetd

なんでデフォルトでIPv6なんだろう。。。

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7