コンテンツにスキップ

セキュリティ

はじめに

本サイトにつきまして、【IT技術の知見】はじめに - 俺の技術ノート をご認識のほど宜しくお願いいたします。


/etc/security

limits

システムのリソース (プロセス数、ファイル数など) を制限する。

/etc/systemd/limits.conf ファイルとしても設定できる。


02. SELinux:Security Enhanced Linux

SELinux とは

Linux にデフォルトで導入されているミドルウェアで、セキュリティを制御する。


設定

▼ SELinux の無効化

アプリケーションと他のソフトウェアの通信を遮断してしまうことがあるため、基本的には無効にしておく。

  1. SELinux の状態を確認

    $ getenforce
    
    # 有効の場合
    Enforcing
    
  2. /etc/selinux/config を修正する。

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    
    # disabledに変更する。
    SELINUX=disabled
    
    # SELINUXTYPE= can take one of these three values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected.
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted
    
  3. OS を再起動

OS を再起動しないと設定が反映されない。