F5: Difference between revisions

278 bytes added ,  18 days ago
Line 448:
=== Enable Internet Access on VMs ===
 
* Add Interface for the common network on host to the VMs:
sysctl -w net.ipv4.ip_forward=1
sudo virsh attach-interface --type bridge --source virbr0 --model virtio client
iptables --table nat --append POSTROUTING --out-interface enp3s0 -j MASQUERADE
 
iptables --insert FORWARD --in-interface br0 -j ACCEPT
 
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface enp3s0ens192 -j MASQUERADE # ens192 is default exit interface in Host
sudo iptables --insert FORWARD --in-interface virbr0 -j ACCEPT # virbr0 is newly added interface in VM