以下にCentOS6.6でtelnetServerを
構築した手順を記載します。
自分自身にすらtelnetできません。。。
なぜでしょう?
設定に間違いがあるのでしょうか?
参考にしたサイトは、
http://futurismo.biz/archives/1339
http://easyramble.com/install-telnet-and-setup.h …
http://www.sea-bird.org/pukiwiki/index.php?CentO …
などです。
(1)telnetクライアントインストール
[root@localhost ~]# yum -y install telnet
(2)telnetサーバーインストール
[root@localhost ~]# yum -y install telnet-server
(3)telnetを許可設定
[root@localhost ~]# vi /etc/hosts.allow
# hosts.allow This file contains access rules which are used to
in.telnetd : 192.168.1. 127.0.0.1 #192.168.223.0のネットワークと自分自身OK
(4)telnet不許可設定
[root@localhost ~]# vi /etc/hosts.deny
# hosts.deny This file contains access rules which are used to
in.telnetd : ALL #追記
(5)
vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE-
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.log_on_failure += USERID
disable = no # ここをyesからnoに変更
}
(6)xinitdを再起動する
[root@localhost ~]# /etc/init.d/xinetd restart
xinetd を停止中: [失敗]
xinetd を起動中: [ OK ]
(7)自分自身にtelnet
[root@localhost ~]# telnet localhost
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
接続できない!!
23番ポートを解放してみる。
[root@localhost ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT #追加しました。
COMMIT
iptablesを再起動
[root@localhost ~]# service iptables restart
もう一度自分自信にtelnetしてみるが接続できず!!
[root@localhost ~]# telnet localhost
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
なぜでしょう??
どなたかご教授下さい。
No.3
- 回答日時:
マルチポストもほどほどにしないと誰も回答してくれなくなりますよ?
どうせ誰かが回答するだろう。と…。
# で、この指摘は事務局削除の対象でしょうなぁ…。
んで、本題。
>(6)xinitdを再起動する
>[root@localhost ~]# /etc/init.d/xinetd restart
>xinetd を停止中: [失敗]
>xinetd を起動中: [ OK ]
の後、netstatでxinetdが設定したポートで待ち受けしているか確認した方がいいでしょう。
>(7)自分自身にtelnet
>[root@localhost ~]# telnet localhost
>Trying ::1...
>Connected to localhost.
接続しようとしたのは「::1」でIPv6の方となります。
ので…
>23番ポートを解放してみる。
>[root@localhost ~]# vi /etc/sysconfig/iptables
対象ファイルが違います。
/etc/sysconfig/ip6tables
があったハズです。
もちろん、適用させる場合の
>iptablesを再起動
>[root@localhost ~]# service iptables restart
も ip6tables になります。
私自身の管理下のCentOSではIPv6を無効にするようにしましたけどね。
# /etc/sysctl.confのnet.ipv6.conf.all.disable_ipv6とnet.ipv6.conf.default.disable_ipv6に1を指定して、
# /etc/hostsのIPv6対応部分をコメントアウトして、
# /etc/netconfigのtcp6とudp6をコメントアウトして、
# /etc/modprobe.d/disable-ipv6.confにoptions ipv6 disable=1を追加して…リブートだったか??
# もちろんIPv6無効にしたのでchkconfig ip6tables offで自動起動も無効。
そんなワケで…
/etc/xinetd.d/telnetのflagsにIPv4を追加して、xinetdがIPv6で待ち受けしないように修正してます。
# flagsに入れないと無理矢理IPv6側で待ち受けしていた…かなぁ???
No.2
- 回答日時:
なぜsshではなくtelnetが必要なのでしょうか?
もし後学のためだとしても、telnetを現場で使うことはほぼないと思いますし
設定するメリットはないと思いますが・・・
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
- ・漫画をレンタルでお得に読める!
- ・14歳の自分に衝撃の事実を告げてください
- ・架空の映画のネタバレレビュー
- ・「お昼の放送」の思い出
- ・昨日見た夢を教えて下さい
- ・ちょっと先の未来クイズ第4問
- ・【大喜利】【投稿~10/21(月)】買ったばかりの自転車を分解してひと言
- ・メモのコツを教えてください!
- ・CDの保有枚数を教えてください
- ・ホテルを選ぶとき、これだけは譲れない条件TOP3は?
- ・家・車以外で、人生で一番奮発した買い物
- ・人生最悪の忘れ物
- ・【コナン30周年】嘘でしょ!?と思った○○周年を教えて【ハルヒ20周年】
- ・ハマっている「お菓子」を教えて!
- ・最近、いつ泣きましたか?
- ・夏が終わったと感じる瞬間って、どんな時?
- ・10秒目をつむったら…
- ・人生のプチ美学を教えてください!!
- ・あなたの習慣について教えてください!!
- ・牛、豚、鶏、どれか一つ食べられなくなるとしたら?
- ・都道府県穴埋めゲーム
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
Debian/GNU Linux V.3.1r1 + PH...
-
sentOS 6.3でsquid.confを開くと
-
BIND エラー not found: 3(NXD...
-
VNCへのアクセス制限
-
centOS5ユーザー管理
-
Apacheとtomcatの連携で発生す...
-
【DNS】ゾーン情報が上手く設定...
-
CentOS6.6でtelnetサーバー構築...
-
Fedora の vsftpd についてです...
-
logrotate.confでmonthlyとした...
-
同一のホスト名で何か問題があ...
-
応答を解析できません
-
パスワード設定していないユー...
-
エラーメールで"too many hops"...
-
リモートデスクトップ接続でパ...
-
「DNSサーバーを自動的に取得す...
-
循環参照にならない方法があっ...
-
DNSサーバを設定したのですがns...
-
”Tortoise SVN” と ”Subversio...
-
コマンドでのFTP転送が進まない。
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
【DNS】ゾーン情報が上手く設定...
-
VNCへのアクセス制限
-
BIND エラー not found: 3(NXD...
-
ネットワークの再起動方法
-
named.confの設定
-
コアダンプについて
-
crontabでtarを実行した際、エ...
-
LDAP認証が上手く行きません
-
NFSサーバー起動時のエラー対処...
-
apacheの<IfModule prefork.c>...
-
FreeBSDのrc.confに変な表示が...
-
logrotate.confでmonthlyとした...
-
CentOSでのbad owner name
-
cron設定で電源のOFFができませ...
-
RHEL5でのCD-ROMマウントに関して
-
CentOSの解像度・変更方法。
-
echo $LANGで何も表示されません。
-
Linuxのtarコマンドで同一ディ...
-
LDAP-OS認証 グループによる制限
-
linux NTP で エラー になる
おすすめ情報