TCP Wrapper の設定


アクセス制限の流れ

設定ファイル 用途
/etc/hosts.allow アクセスを許可するサービスおよびクライアントを設定する。
/etc/hosts.deny アクセスを拒否するサービスおよびクライアントを設定する。

/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.
#

▼/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!

TCP Wrapper の設定

SSHの設定の場合
/etc/hosts.allowの設定 /etc/hosts.denyの設定
##sshd
sshd : 192.168.0./255.255.255.0
ALL : ALL