Skip to content

Instantly share code, notes, and snippets.

@cretudorin
Last active March 5, 2023 13:01
Show Gist options
  • Save cretudorin/1f9584b72594f1f87180978f1a44ff35 to your computer and use it in GitHub Desktop.
Save cretudorin/1f9584b72594f1f87180978f1a44ff35 to your computer and use it in GitHub Desktop.
kvm netplan bridge
# /etc/netplan/01-kvmbridge.yaml
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: yes
dhcp6: no
bridges:
br0:
dhcp4: yes
interfaces: [enp2s0]
nameservers:
addresses: [1.1.1.1, 8.8.8.8]
## /etc/docker/daemon.json
{
"bridge": "br0",
"iptables": false
}
## KVM instance config
<interface type='bridge'>
<mac address='52:54:00:01:02:03'/>
<source bridge='br0'/>
<model type='virtio'/>
</interface>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment