DebianでSnortを設定する方法
Snortは無料のネットワーク侵入検知システムです。最新の方法で、SnortをDebianにインストールし、設定する手順を紹介します。ネットワークのセキュリティを強化しましょう。
Giteaは、Gitを搭載した代替オープンソースの自己ホスト型バージョン管理システムです。GiteaはGolangで記述されており、あらゆるプラットフォームでホストされる軽量のソリューションです。
sudo
特権を持つ非rootユーザー。パッケージリストを更新します。
sudo apt update
Nginxをインストールします。
sudo apt -y install nginx
インストールが完了したら、次のコマンドを実行してNginxサービスを開始して有効にします。
sudo systemctl enable nginx.service
sudo systemctl start nginx.service
これは次のコマンドで実行できます。
sudo apt -y install git
Giteaは以下のデータベースサーバーをサポートしています。
このチュートリアルでは、MariaDBサーバーとクライアントを使用します。
sudo apt -y install mariadb-server mariadb-client
完了したら、MariaDBが有効で実行されていることを確認します。
sudo systemctl enable mariadb.service
sudo systemctl start mariadb.service
その後、以下のコマンドを実行して、rootパスワードを作成し、リモートrootアクセスを禁止することにより、MariaDBサーバーを保護します。
sudo mysql_secure_installation
プロンプトが表示されたら、ガイドに従って以下の質問に答えます。
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
MariaDBを再起動します。
sudo systemctl restart mariadb.service
以下のコマンドを入力して、MariaDBコンソールにログインします。
sudo mysql -u root -p
次に、上記で作成したパスワードを入力してログインします。MariaDBウェルカムメッセージが表示されます。
というデータベースを作成しますgitea
。
CREATE DATABASE gitea;
giteauser
新しいパスワードで呼び出されるデータベースユーザーを作成します。
CREATE USER 'giteauser'@'localhost' IDENTIFIED BY 'new_password_here';
new_password_here
強力で複雑なパスワードに置き換えてください。
次に、ユーザーにデータベースへのフルアクセスを許可します。
GRANT ALL ON gitea.* TO 'giteauser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
最後に、変更を保存して終了します。
FLUSH PRIVILEGES;
EXIT;
Giteaを実行するユーザーを作成します。
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
必要なディレクトリ構造を作成します。
sudo mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
sudo chown git:git /var/lib/gitea/{data,indexers,log}
sudo chmod 750 /var/lib/gitea/{data,indexers,log}
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea
Giteaバイナリは、次のコマンドを実行してダウンロードできます。
sudo wget -O gitea https://dl.gitea.io/gitea/1.5.0/gitea-1.5.0-linux-amd64
sudo chmod +x gitea
バイナリをグローバルな場所にコピーします。
sudo cp gitea /usr/local/bin/gitea
Linuxサービスファイルを作成します。
sudo touch /etc/systemd/system/gitea.service
任意のテキストエディターを使用して、この新しく作成したファイルを開き、次のように入力します。
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
After=mariadb.service
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
起動時にGiteaを有効にして起動します。
sudo systemctl daemon-reload
sudo systemctl enable gitea
sudo systemctl start gitea
Giteaが実行されていることを確認します。
sudo systemctl status gitea
デフォルトのnginx構成ファイルを削除します。
sudo rm /etc/nginx/sites-enabled/default
Giteaのリバースプロキシ構成を作成します。
sudo touch /etc/nginx/sites-available/git
ファイルに次の設定を入力example.com
し、ドメイン名またはIPアドレスに置き換えてください。
upstream gitea {
server 127.0.0.1:3000;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com;
root /var/lib/gitea/public;
access_log off;
error_log off;
location / {
try_files maintain.html $uri $uri/index.html @node;
}
location @node {
client_max_body_size 0;
proxy_pass http://localhost:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_max_temp_file_size 0;
proxy_redirect off;
proxy_read_timeout 120;
}
}
Gitea Nginxリバースプロキシ構成を有効にします。
sudo ln -s /etc/nginx/sites-available/git /etc/nginx/sites-enabled/git
次に、Nginxサービスをリロードします。
sudo systemctl reload nginx.service
次に、ブラウザーを開き、サーバーのホスト名またはIPアドレスを参照します。
http://YOUR_SERVER_IP/install
画面の指示に従ってGiteaのセットアップを完了します。
Snortは無料のネットワーク侵入検知システムです。最新の方法で、SnortをDebianにインストールし、設定する手順を紹介します。ネットワークのセキュリティを強化しましょう。
Debian 10にWebDAVをデプロイする方法を学び、WsgiDAVとSSL証明書で安全な接続を実現しましょう。
CentOS 7サーバーにApache 2.4をインストールする方法を説明します。安定したウェブサーバーを構築するための前提条件と手順を解説します。
FreeBSD 11.1におけるBlacklistdのインストール方法について詳しく解説します。この方法を通じて、強力なセキュリティ対策を実装できます。
サーバーマネージャーを使用して、Windows Serverの管理が向上します。セキュリティリスクを軽減し、効率的な管理を実現します。
CentOS 7にSeafileサーバーをインストールする方法。Seafile(コミュニティバージョン)は、ownCloudに似た無料のオープンソースファイル同期および共有ソリューションです。
Snortは無料のネットワーク侵入検知システムです。最新の方法で、SnortをDebianにインストールし、設定する手順を紹介します。ネットワークのセキュリティを強化しましょう。
CentOS 7にGraylogサーバーをインストールし、ログ管理を行う方法を学びます。
WindowsサーバーでWebサイトを実行している場合、電子メールも受信できるようにするためにhMailServerを使用する方法を解説します。
FiveMサーバーをUbuntu 19.04にインストールするための詳細なガイド。必要条件からインストール、起動、トラブルシューティングまで、すべてのステップを含みます。
Debian 10にWebDAVをデプロイする方法を学び、WsgiDAVとSSL証明書で安全な接続を実現しましょう。
ヘルスケアにおけるAIは、過去数十年から大きな飛躍を遂げました。したがって、ヘルスケアにおけるAIの未来は、日々成長を続けています。