After setting up bridge network on network interface enp9s0, kvm guests had issues with accessing ssh, internet.
Current bridge configuration:
bridge name bridge id STP enabled interfaces
br0 8000.001c2301fbdc no enp9s0
To allow kvm guests network connectivity with host net.ipv4.ip_forward should be enabled, add net.ipv4.ip_forward = 1 to /etc/sysctl.conf:
kernel.sysrq = 1
vm.swappiness=10
vm.vfs_cache_pressure=50
net.ipv4.ip_forward = 1
To make changes take effect without reboot execute sysctl -p:
sysctl -p
Depending on whether you are using firewalld or iptables they need to be adjusted.
Iptables:
iptables -I FORWARD -i br0 -j ACCEPT
iptables -I FORWARD -o br0 -j ACCEPT
Firewalld:
firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -i br0 -j ACCEPT
firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -o br0 -j ACCEPT
firewall-cmd --reload
Related Articles
Converting vmware vmdk images to kvm qcow2 images
Red hat certifications are one of the most demanding in the IT industry, I wanted to get started with planning working towards getting RHCE certified.
No internet on kvm guests.
After setting up bridge network on network interface enp9s0, kvm guests had issues with accessing ssh, internet.
Virt-manager error on fedora 26
virt-manager is a graphical tool to manage KVM VMs on a host, due to some dependency or reinstall of libvirt can cause virt-manager to show ImportError: No module named libvirt.