セキュリティ設定
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
**suの実行を制限する [#u0474b98]
Linuxの初期設定ではどのユーザからでもsuを使用したユーザの...
wheelグループに属するユーザのみがsuを実行できるように制限...
suの実行制御はPAMにより行われている。~
PAMの設定ファイルには下記箇所に集約されている。~
/etc/pam.d
suの実行制御を行っているファイルは下記となる。
/etc/pam.d/su
wheelグループのみ権限昇格を許可するには下記行のコメントア...
auth required /lib/security/$ISA/pam_wheel.so ...
設定は即時に反映されるため、OSの再起動などは不要である。
**SSHのアクセス制限 [#rcc1208f]
SSH接続の制限は、hosts.denyとhosts.allowを使用して行う。~
全てをdenyしておき、許可するものだけhosts.allowで設定する。
-hosts.deny(アクセス不可条件を設定するファイル )
#
# hosts.deny This file describes the names of the hos...
# *not* allowed to use the local INET serv...
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remin...
# the new secure portmap uses hosts.deny and hosts.allow...
# you should know that NFS uses portmap!
ALL : ALL
-hosts.allow(アクセス許可条件を設定するファイル)~
preview環境からのみssh接続を許可するようにする。
#
# hosts.allow This file describes the names of the hos...
# allowed to use the local INET services, ...
# by the '/usr/sbin/tcpd' server.
#
ALL : 192.168.100.0/255.255.255.0
## SSH
sshd : 222.230.141.164
-sshでのrootログインを許可しない
[root@centos4 ssh]# vi /etc/ssh/sshd_config
(変更前)#PermitRootLogin yes
↓
(変更後)PermitRootLogin no
[root@centos4 ssh]# /etc/init.d/sshd restart
sshd を停止中: ...
sshd を起動中: ...
終了行:
**suの実行を制限する [#u0474b98]
Linuxの初期設定ではどのユーザからでもsuを使用したユーザの...
wheelグループに属するユーザのみがsuを実行できるように制限...
suの実行制御はPAMにより行われている。~
PAMの設定ファイルには下記箇所に集約されている。~
/etc/pam.d
suの実行制御を行っているファイルは下記となる。
/etc/pam.d/su
wheelグループのみ権限昇格を許可するには下記行のコメントア...
auth required /lib/security/$ISA/pam_wheel.so ...
設定は即時に反映されるため、OSの再起動などは不要である。
**SSHのアクセス制限 [#rcc1208f]
SSH接続の制限は、hosts.denyとhosts.allowを使用して行う。~
全てをdenyしておき、許可するものだけhosts.allowで設定する。
-hosts.deny(アクセス不可条件を設定するファイル )
#
# hosts.deny This file describes the names of the hos...
# *not* allowed to use the local INET serv...
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remin...
# the new secure portmap uses hosts.deny and hosts.allow...
# you should know that NFS uses portmap!
ALL : ALL
-hosts.allow(アクセス許可条件を設定するファイル)~
preview環境からのみssh接続を許可するようにする。
#
# hosts.allow This file describes the names of the hos...
# allowed to use the local INET services, ...
# by the '/usr/sbin/tcpd' server.
#
ALL : 192.168.100.0/255.255.255.0
## SSH
sshd : 222.230.141.164
-sshでのrootログインを許可しない
[root@centos4 ssh]# vi /etc/ssh/sshd_config
(変更前)#PermitRootLogin yes
↓
(変更後)PermitRootLogin no
[root@centos4 ssh]# /etc/init.d/sshd restart
sshd を停止中: ...
sshd を起動中: ...
ページ名: