セキュリティの設定

ここでの設定は任意ですので、利用目的に合わせて自由に設定して下さい。

1. コントロールパネルでの設定

まず、コントロールパネルに管理者ユーザIDでログインします。
URLは、
http://(ドメイン名もしくはIPアドレス)/ControlPanel/
です。

(1) パスワードの変更
初期パスワードを変更します。
左側のメインメニューの「プロフィール」カテゴリーにある「パスワードの変更」をクリックします。
ここで、「新バスワード」および「新パスワードの変更」に同じパスワード文字列を入力して、「保存」ボタンを押します。
※この管理者パスワードは重要ですので、絶対忘れないで下さい。

(2) FTPの停止
FTPはセキュリティ的に脆弱ですので、FTPのサービスを停止させます。
左側のメインメニューの「システム管理」カテゴリーにある「サービス管理」をクリックします。
サービス一覧が表示されますので、サービス名「ftp」のオプションの「停止」をクリックします。
状態が「停止中」になったら、OK。


2. SSHのIP制限

SSHでのログインに対してIPアドレスでの制限をかけます。
「/etc/hosts.allow」で許可するIPアドレス(ドメイン名)を記載して、「/etc/hosts.deny」で拒否するIPアドレス(ドメイン名)を記載します。

まず、「/etc/hosts.allow」を編集します。
# vi /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.
#
sshd: xxx.xxx.xxx.xxx
※複数のIPアドレスを記載できます。(書式に関してはマニュアル等を参照して下さい。)

次に、「/etc/hosts.deny」を編集します。
# vi /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!
sshd: All

「hosts.allow」、「hosts.deny」は保存すると直ぐに反映されます。
ファイルの編集の順序や記述内容が間違ってしまうと、最悪の場合次回からサーバへのログインができなくなってしまう場合があるので、十分注意して下さい。



最終更新:2013年10月25日 15:16