From 9cc818ecefad7ef3cf867bc6d6fb934ff20d9dde Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:35:37 +0800 Subject: [PATCH] Update lxd_custom.md --- docs/en_US/guide/lxd_custom.md | 131 +++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/docs/en_US/guide/lxd_custom.md b/docs/en_US/guide/lxd_custom.md index e69de29bb2..79c10441cc 100644 --- a/docs/en_US/guide/lxd_custom.md +++ b/docs/en_US/guide/lxd_custom.md @@ -0,0 +1,131 @@ +--- +outline: deep +--- + +## Attach free IPV6 address segments to host machines + +Some machines do not have an IPV6 /64 subnet, so here is a way to attach an IPV6 subnet for free. + +Combined with the previous script that opens containers with IPV6 addresses, you can attach an IPV6 address to each container. + +The disadvantage is that the address is rather dirty, cloudflare cdn may not be able to set up, self-testing + +0. Initial environment modification + +Execute: + +``` +touch /etc/cloud/cloud-init.disabled +``` + +Turn off the automated overwrite of cloud-init first, and then check what the machine uses to manage the network by running + +``` +systemctl is-active systemd-networkd +``` + +and + +``` +systemctl is-active networking +``` + +See which case it belongs to, if it's active in the former and inactive in the latter, you need to reinstall/DD a system that's not configured this way, or switch the local machine to use ifupdown to manage network execution + +``` +# Judge for yourself if you need to disable the original network management. +# sudo systemctl stop systemd-networkd +# sudo systemctl disable systemd-networkd +# sudo systemctl stop systemd-networkd.socket +# sudo systemctl disable systemd-networkd.socket + +sudo apt-get install ifupdown +sudo systemctl start networking +sudo systemctl enable networking +``` + +Then reboot the server, check whether the machine's network will be rebooted due to the modification of the situation, and execute ```uptime`` to observe that the startup has been more than 1 minute before proceeding to the next step. + +If it is inactive and active, there is no need to switch the network management program and you can proceed directly to the next step. + +1. Register for an account at [https://tunnelbroker.net/](https://tunnelbroker.net/) and click ``Create Regular Tunnel`` on the left. + +![1](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/35923be5-821f-45c8-8401-962ea3f97726) + +2. Fill in the red box with the IPV4 address of your server, choose a connection point that is close to the physical distance, for example, if the machine is in Los Angeles, choose a connection point on the west coast of the U.S., and then display the green box prompts, point ``Create Tunnel`` to create it! + +![2](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/cab04113-4d6a-4d6f-9952-d3851057fc4a) + +![3](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/518dc62a-c8d0-48e3-bb13-befc39348990) + +![4](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/6188de3f-e83c-400e-9594-dd3f73aaf46a) + +3. Wait for the following screen, click ``Example Configurations`` and select the corresponding system, for example, the host of LXD is definitely Debian/Ubuntu. + +![5](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/9f0045fc-b1ac-4954-9ecd-1fba47d07d8a) + +![6](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/2fb7c951-371c-452c-b775-78f69b980a2c) + +4. The boxed part is the document to be modified and the content to be filled in. + +![7](https://github.com/oneclickvirt/oneclickvirt.github.io/assets/103393591/c0156902-b4c0-4001-823e-50f611215393) + +5. Execute the following commands to append IPV6 settings to your network configuration file (or modify the ``/etc/network/interfaces`` file yourself with vim or vi commands to add them). + +``` +sudo tee -a /etc/network/interfaces <