CentOS / telnet
View Outline
telnet 構築メモ。(CentOS 4.4 上で)
- 参考にしたサイト
- http://kajuhome.com/telnet.shtml
パッケージのダウンロード
# yum -y install telnet-server Setting up Install Process Setting up repositories Reading repository metadata in from local files extras : ################################################## 97/97 Added 97 new packages, deleted 0 old in 2.05 seconds Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for telnet-server to pack into transaction set. telnet-server-0.17-31.EL4 100% |=========================| 7.6 kB 00:00 ---> Package telnet-server.i386 1:0.17-31.EL4.3 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: telnet-server i386 1:0.17-31.EL4.3 base 33 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 33 k Downloading Packages: (1/1): telnet-server-0.17 100% |=========================| 33 kB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: telnet-server ######################### [1/1] Installed: telnet-server.i386 1:0.17-31.EL4.3 Complete! #
/etc/xinetd.d/telnet の、disable=yes を no にする。
システムの再起動またはデーモンの再起動
# reboot
または
# /etc/init.d/xinetd restart
テスト時は設定不要なステップ(外部ネットワークと接続する場合は必要)
/etc/hosts.allow に、許可するホストを追加
# # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # in.telnetd : 192.168.0. 127.0.0.1
/etc/hosts.deny に、許可しないホストを追加
# # hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # # The portmap line is redundant, but it is left to remind you that # the new secure portmap uses hosts.deny and hosts.allow. In particular # you should know that NFS uses portmap! in.telnetd : ALL
ALL とすれば、hosts.allow に記載のないホストから接続できなくなる。