Answer the question
In order to leave comments, you need to log in
How to setup network for guest OS?
Good afternoon. Please help.
There is a host with a guest virtual machine.
The host has internet access through br0 and access to the virtual machine through virbr0. IP of the virtual machine 192.168.122.10
How to configure iptables on the host so that the virtual machine goes online?
Answer the question
In order to leave comments, you need to log in
On the host:
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
iptables -t nat -A POSTROUTING -s 192.168.122.0/24 -j MASQUERADE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question