0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Wazuh 公式VMイメージでの固定IP方法

0
Posted at

Wazuhでは公式でOVA仮想マシンイメージを提供しています。

Amazon Linux 2023上にWazuhをインストールしたものを配布しているようです。

image.png

日本語入力できない方へ

Key Mapを日本語キーボードに設定してください。

localectl set-keymap jp

手順

  1. rootユーザに切り替える

    sudo -i
    
  2. cloud-initによるネットワーク設定を停止する

    vim /etc/cloud/cloud.cfg
    

    一番下の行に以下を追加

    network:
      config:  disabled
    
  3. 再起動

    reboot
    
  4. 再度rootユーザに切り替え

    sudo -i
    
  5. 固定IPのネットワーク設定を追加

    cp -fv /etc/systemd/network/10-cloud-init-eth0.network /etc/systemd/network/10-static-eth0.network
    

    以下の内容を修正して追加

    ※ Matchの値は変更しない
    ※ NetworkのDHCPはnoに変更
    ※ AddressとGatewayとDNSは設定したい値に変更

    [Match]
    MACAddress=00:00:00:00:00:00
    Name=eth0
    
    [Network]
    DHCP=no
    Address=192.168.1.100/24
    Gateway=192.168.1.1
    DNS=192.168.1.1
    
  6. cloud-initで自動作成されたネットワーク設定を削除

    rm -f /etc/systemd/network/10-cloud-init-enp0s3.network
    rm -f /etc/systemd/network/10-cloud-init-eth0.network
    
  7. 適用

    systemctl restart systemd-networkd
    
  8. 変更確認

    ip a
    
  9. 再起動しても設定が生きているか確認

    reboot
    

    再起動後に以下を実行

    ip a
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?