hosts.allowの設定について【SSH接続制限編】 - CentOS|Systems Engineer Wiki

Systems Engineer Wiki

訪問者:23,248,658 人目

<< 2023年01月 

1234567
891011121314
15161718192021
22232425262728
293031
お知らせ・メンテナンス情報
  >  
  >  
hosts.allowの設定について【SSH接続制限編】

hosts.allowの設定について【SSH接続制限編】

投稿日:2015-01-27 19:29:34

hosts.allowの設定について【SSH接続制限編】

サーバの設定を行った際特定IPからの接続に対し接続を許可する方法について解説します。 今回は特定のIPからSSH接続のみ許可をする場合そのような設定を行うかの参考例を記載致します。 サーバへの接続制限を行う場合は、hosts.allowに下記のような設定を行う事により特定IPからの接続のみ接続を許可すると行った設定になります。

# vi /etc/hosts.allow # # hosts.allow This file contains access rules which are used to # allow or deny connections to network services that # either use the tcp_wrappers library or that have been # started through a tcp_wrappers-enabled xinetd. # # See 'man 5 hosts_options' and 'man 5 hosts_access' # for information on rule syntax. # See 'man tcpd' for information on tcp_wrappers # sshd:192.168.0.100

上記は、192.168.0.100からのクライアントに対してSSHの接続権限を付与すると行ったことになります。 サーバのIP接続制限に関しては他にも設定を行う方法が複数あるのであくまでも参考程度の情報として記載致します。