У нас вы можете посмотреть бесплатно How to Setup Ubuntu Host to Provide Internet for Guests on Private Subnet или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Learn how to configure an Ubuntu host to enable Internet access for virtual machine guests on a private subnet without the need for an external router. --- This video is based on the question https://askubuntu.com/q/1511027/ asked by the user 'Marek Dusek' ( https://askubuntu.com/u/1781691/ ) and on the answer https://askubuntu.com/a/1511195/ provided by the user 'Marek Dusek' ( https://askubuntu.com/u/1781691/ ) at 'Ask Ubuntu' website. Thanks to these great users and Stackexchange community for their contributions. Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: How to setup ubuntu host to provide internet for guests on private subnet? Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l... The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license. If anything seems off to you, please feel free to drop me a comment under this video. --- Setting Up Ubuntu to Provide Internet for Virtual Machine Guests As a developer working with virtual machines, you may encounter a scenario where you need your Ubuntu host to provide Internet access to guests on a private subnet. This setup can be particularly challenging if you're working in an environment where you don't have an external router available to bridge the connection. In this guide, we will delve into the configuration required to achieve this, especially in a nested virtualization context. The Challenge This is the situation you're facing: Current Setup: You have an old configuration with an Asus router providing a public IP and managing DHCP for internal guests. New Host Configuration: Your new Ubuntu host is virtualized and connected via a public IP, but there's no traditional router available to direct traffic from the guests to the Internet. The goal here is to enable the guest virtual machines (VMs) to access the Internet while they reside on a private subnet (192.168.84.x). Overview of Solutions To successfully configure your Ubuntu host, you will need to ensure that: The host can reach the Internet. The guests can communicate with each other and the host. The guests can access the Internet through the host. Step-by-Step Configuration 1. Configuring Netplan You need to set up the network configuration for your Ubuntu host using Netplan. Below is an example of how your netplan.yaml should be configured: [[See Video to Reveal this Text or Code Snippet]] 2. Setting Up DHCP To ensure that your guest VMs receive the correct IP configuration, you will need to set up a DHCP server. Here’s an example of the dhcpd.conf configuration: [[See Video to Reveal this Text or Code Snippet]] Make sure your DHCP server is also configured to use the br0 interface by updating the following line in your isc-dhcp-server configuration: [[See Video to Reveal this Text or Code Snippet]] 3. Adding NAT Rules The final step to allow guests to access the Internet is to add a NAT (Network Address Translation) rule. This will help in masquerading the internal IP addresses of the guests. You can achieve this by running the following command: [[See Video to Reveal this Text or Code Snippet]] 4. Verifying the Configuration Once you have implemented the above configurations, you should check if: The host can access the Internet. VMs can communicate with each other and with the host. VMs can access the Internet. Conclusion By following this guide, you should now have a functioning setup that allows your virtual machine guests on a private subnet to access the Internet through your Ubuntu host. This setup does not rely on an external router and utilizes Linux's powerful networking features to bridge the gap. If you followed along and set up everything correctly, your guests should now be able to ping external hosts and surf the web! Happy networking!