1

Here is my configuration, I have a Ubuntu 20.04 host machine with a kvm virtual machine holding a webserver. I set the folowing rules with iptables in order to root the ports 80 and 443 of the host machine to the guest machine :

sudo iptables -I FORWARD -o virbr0 -d  192.168.122.133 -j ACCEPT
sudo iptables -t nat -I PREROUTING -i eno1 -p tcp --dport 80 -j DNAT --to 192.168.122.133:80
sudo iptables -t nat -I PREROUTING -i eno1 -p tcp --dport 443 -j DNAT --to 192.168.122.133:443

That way I do have access to all my websites from the entire world. Except from the host machine or from the guest machine itself. Which rules do I have to set up in order to make this "loopback" working ?

0 Answers0