banner
herman

herman

哈哈哈哈哈哈哈哈哈哈哈哈哈哈

Set the static IP address of the QNAP LXD type container.

In QNAP containers, there are various types, such as those created through SSH commands, those created through Compose, and those created through LXD. Among them, LXD type containers require setting a static IP and need to be set through the terminal. This article will use the Baota panel as an example to record the setup process.

  1. On the LXD Baota container page, click on "Connect to Terminal"
    1701329130185.png
  2. Enter the username and password when prompted. Enter the username "root" and the password "123456" (Note: The password will not be displayed during input. Just keep typing and it will be entered. Additionally, the password can be set by yourself, and the method is recorded in this blog.)
    1701329279279.png
  3. Execute the command:
nano /etc/systemd/network/eth0.network

Modify it to your own local network IP range. The first one is the IP, the second one is the gateway, and the third and fourth ones are DNS (having one line for DNS is also acceptable). The first IP must be followed by a subnet mask, which is /24. For example, change it to:
[Network]
Address=10.10.10.15/24
Gateway=10.10.10.1
DNS=10.10.10.1
DNS=114.114.114.114
or like this:
[Network]
Address=192.168.50.30/24
Gateway=192.168.50.1
DNS=223.5.5.5
DNS=114.114.114.114
1701329303879.png
Press "ctrl+x" to save, then enter "Y"
1701329369958.png
Press enter as shown in the figure below
1701329384781.png
Type "reboot" and press enter
Everything is OK.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.