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?

UbuntuのCockpitでネットワークを管理できるようにする方法

Posted at

Ubuntu24.04で固定IPを設定しているマシンのcockpit上でネットワークを扱えるようになるまでに苦労したので備忘録を書いておく.IPアドレスやファイル名などは環境に合わせて読み替えてください.

前提条件

  • Ubuntu24.04にCockpitを導入していること.

固定IPの設定

/etc/netplan/99_config.yaml 等のファイルを作成し,下記の様にIPアドレスなどを設定する.

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp0s31f6:
      addresses:
      - "192.168.10.102/24" #ノードのIPアドレス,ネットマスク
      nameservers:
        addresses:
        - 127.0.0.1 #このノード自体がDNSなのでこうなる(環境に合わせて変えてください)
      routes:
       - to: default
         via: 192.168.10.1 #いわゆるデフォルトゲートウェイ

このファイルはセキュリティ上 $ sudo chmod 600 /etc/netplan/99_config.yaml すること.

NetworkManagerでの管理に変更

$ sudo netplan generate
$ sudo netplan apply
$ sudo systemctl start NetworkManager
$ sudo systemctl enable NetworkManager

を実行する.記憶が怪しく間違っているかもしれません.もしそうなら指摘願います.

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?