Skip to main content

Host network setup

To use the host with anything other then docker (like libvrtd, vmware or similar) the networks need to be bridged. 

On Debian-based distros we edit,edit

/etc/netplan/50-cloud-init.yaml

making sure to follow the instructions in the header of the file and disable cloud-init

init.

/etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    renderer: networkd
    ethernets:
        eno1:
            dhcp4: no  # Disable direct DHCP, handled via bridge
            dhcp6: no
    bridges:
        br0:
            interfaces: [eno1] #Or similar
            dhcp4: true  # Obtain an IP address dynamically from your router
            dhcp6: false
            parameters:
                stp: false  # Spanning Tree Protocol off for better performance
                forward-delay: 0
            nameservers:
                addresses:
                    - 192.168.178.1  # Use your router as the DNS server